spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column49


Using JavaScript in HomeSite 4.0, Part II

Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

Manipulating Toolbars, Part I

In this page we'll teach you how to control the toolbars from JavaScript. Familiarize yourself with HomeSite's toolbars. Each toolbar is identified by a unique name which is both its file name as well as its window caption. Toolbars are loaded from files in the toolbar directory, which can be obtained from the ToolbarDir property. If, for example, the name of the toolbar is Common, its file will be stored under c:\homesite\toolbars\Common.tbr. The rest of this page covers the toolbar-related Application Object's property and methods.

ToolbarDirString

Returns the full path of the directory where toolbar files reside. For example, the following JavaScript call:

app.MessageBox(app.ToolbarDir, "test", 0)

yields the following dialog box on our machine:

CreateToolbar(toolbarName)Boolean

Creates a new toolbar with the given name (toolbarName). For example, calling app.CreateToolbar("yehuda") creates a new toolbar named "yehuda". You can see the list of toolbars under the Options/Customize menu. Returns a true value if successful, a false value otherwise.

HideToolbar(toolbarName)Boolean

Hides the given toolbar (toolbarName). Returns a true value if successful, a false value otherwise. A false value is returned when the given toolbar is not found. The JavaScript call app.HideToolbar("yehuda") hides the previously-created toolbar. You can also verify that the toolbar named "yehuda" is unchecked in the toolbar list under Options/Customize menu.

DeleteToolbar(toolbarName)Boolean

Deletes the given toolbar (toolbarName). You can delete only custom toolbars. You can hide built-in toolbars but you cannot delete them. Returns a true value if successful, a false value otherwise. A false value is returned when the given toolbar is not found. For example, the call app.DeleteToolbar("yehuda") deletes the previously-created-and-hidden toolbar "yehuda." You can verify that the toolbar "yehuda" does not exist in the toolbar list under Options/Customize/Toolbars menu.

ShowToolbar(toolbarName)Boolean

Shows the given toolbar (toolbarName) if it's hidden. Returns a true value if successful, a false value otherwise. A false value is returned when the toolbar is not found. You can verify that the toolbar is deleted by going over the toolbar list under the Options/Customize/Toolbar menu.

ToolbarExists(toolbarName)Boolean

Returns a true value if the given toolbar (toolbarName) exists. For example, the call app.ToolbarExists("linkbot") returns a true value. You can scan all existing toolbars under the Options/Customize/Toolbars menu.

SetToolbarDockPos(toolbarName, positionFlag)Boolean

Sets the position of the given toolbar (toolbarName). The toolbar position (positionFlag) can be one of the following: 1 (top), 2 (bottom), 3 (left), or 4 (right). See what happens when you call app.SetToolbarDockPos("linkbot", 1). You should see the linkbot toolbar at the left top corner of the window. When you change the parameter to 2, it will be at the bottom left corner. Specifying 3 will position the toolbar along the left edge of the window, and the 4 value does so along the right hand side. Returns a true value when successful, a false value otherwise. A false value is returned when the given toolbar is not found.

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Fixing MySQL Replication · Firewall Guide: First Steps to Securing the Enterprise · VoxOx Tames the Tumultuous Communications Tangle


Created: September 27, 1999
Revised: September 27, 1999

URL: http://www.webreference.com/js/column49/toolbar1.html