Bladez
10-18-2008, 09:01 AM
I am hoping to get a response by anyone who knows how to create a firefox toolbar and its .xul and so on. Hopefully.
I am hv no idea wat is wrong with my code below hopefully someone can point it out n explain to me better how how this works.. i manage to edit thru tutorials sample code. it worked..but wen i added the second code (this):
<toolbarbutton id="TutTB-Combined-Links" type="menu"
tooltiptext="Uniten Toolbar Main Menu">
<menupopup>
<menuitem label="Student Information" accesskey="S"
tooltiptext="Navigate to Serrano/Info"
oncommand="TutTB_LoadURL('http://info.uniten.edu.my/info')" />
<menuseparator />
<menuitem label="Subject Reg. & Aprt. Booking" accesskey="B"
tooltiptext="Navigate to Tioman/Online"
oncommand="TutTB_LoadURL('http://online.uniten.edu.my/online')" />
<menuseparator />
<menuitem label="Apartment (Aprt.) Registration" accesskey="A"
tooltiptext="Navigate to Tioman/Residence"
oncommand="TutTB_LoadURL('http://residence.uniten.edu.my/residence')" />
</menupopup>
</toolbarbutton>
it doesnt work anymore.. i hv no idea wats wrong help me out thank you
here is the full code for it the .xul :
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://tuttoolbar/skin/tuttoolbar.css" type="text/css"?>
<overlay id="TutTB-Overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"
src="chrome://tuttoolbar/content/tuttoolbar.js" />
<toolbox id="navigator-toolbox">
<toolbar id="TutTB-Toolbar" toolbarname="Tutorial Toolbar" accesskey="T"
class="chromeclass-toolbar" context="toolbar-context-menu"
hidden="false" persist="hidden">
<toolbaritem flex="0">
<toolbarbutton id="TutTB-MainMenu" type="menu"
tooltiptext="Uniten Toolbar Main Menu">
<menupopup>
<menuitem label="Uniten Home Page" accesskey="U"
tooltiptext="Navigate to Uniten Website"
oncommand="TutTB_LoadURL('http://www.uniten.edu.my/')" />
<menuseparator />
<menuitem label="Current Student" accesskey="C"
tooltiptext="Navigate to Current Student (Under Uniten Website)"
oncommand="TutTB_LoadURL('http://www.uniten.edu.my/newhome/content_list.asp?CatID=214')" />
</menupopup>
</toolbarbutton>
</toolbaritem>
<toolbaritem id="TutTB-SearchTerms-TBItem" persist="width">
<menulist id="TutTB-SearchTerms" editable="true" flex="1"
minwidth="100" width="250"
onkeypress="TutTB_KeyHandler(event);">
<menupopup id="TutTB-SearchTermsMenu" onpopupshowing="TutTB_Populate()" />
</menulist>
</toolbaritem>
<splitter id="TutTB-ResizeSplitter" state="open" collapse="none"
resizebefore="closest" resizeafter="farthest"
tooltiptext="Resize the Search Box">
<vbox id="TutTB-ResizeBar" />
</splitter>
<toolbaritem flex="0">
<toolbarbutton id="TutTB-Combined-Button" label="Search"
type="menu-button" tooltiptext="Combined Search"
oncommand="TutTB_Search(event, 'web')">
<menupopup>
<menuitem id="TutTB-Combined-Web" label="Google Search"
class="menuitem-iconic" tooltiptext="Search Via Google"
oncommand="TutTB_Search(event, 'web'); event.stopPropagation();" />
<menuitem id="TutTB-Combined-Yahoo" label="Yahoo! Search"
class="menuitem-iconic" tooltiptext="Search Via Yahoo!"
oncommand="TutTB_Search(event, 'yahoo'); event.stopPropagation();" />
<menuitem id="TutTB-Combined-MSN" label="MSN Search"
class="menuitem-iconic" tooltiptext="Search Via MSN"
oncommand="TutTB_Search(event, 'msn'); event.stopPropagation();" />
</menupopup>
</toolbarbutton>
<toolbarseparator />
<toolbarbutton id="TutTB-Combined-Links" type="menu"
tooltiptext="Uniten Toolbar Main Menu">
<menupopup>
<menuitem label="Student Information" accesskey="S"
tooltiptext="Navigate to Serrano/Info"
oncommand="TutTB_LoadURL('http://info.uniten.edu.my/info')" />
<menuseparator />
<menuitem label="Subject Reg. & Aprt. Booking" accesskey="B"
tooltiptext="Navigate to Tioman/Online"
oncommand="TutTB_LoadURL('http://online.uniten.edu.my/online')" />
<menuseparator />
<menuitem label="Apartment (Aprt.) Registration" accesskey="A"
tooltiptext="Navigate to Tioman/Residence"
oncommand="TutTB_LoadURL('http://residence.uniten.edu.my/residence')" />
</menupopup>
</toolbarbutton>
<toolbarseparator />
<toolbarbutton id="TutTB-Combined-Coit" tooltiptext="Navigate To COIT Portal"
label="COIT Portal" oncommand="TutTB_LoadURL('http://coit.uniten.edu.my/')" />
</toolbaritem>
<toolbarspring />
</toolbar>
</toolbox>
</overlay>
I am hv no idea wat is wrong with my code below hopefully someone can point it out n explain to me better how how this works.. i manage to edit thru tutorials sample code. it worked..but wen i added the second code (this):
<toolbarbutton id="TutTB-Combined-Links" type="menu"
tooltiptext="Uniten Toolbar Main Menu">
<menupopup>
<menuitem label="Student Information" accesskey="S"
tooltiptext="Navigate to Serrano/Info"
oncommand="TutTB_LoadURL('http://info.uniten.edu.my/info')" />
<menuseparator />
<menuitem label="Subject Reg. & Aprt. Booking" accesskey="B"
tooltiptext="Navigate to Tioman/Online"
oncommand="TutTB_LoadURL('http://online.uniten.edu.my/online')" />
<menuseparator />
<menuitem label="Apartment (Aprt.) Registration" accesskey="A"
tooltiptext="Navigate to Tioman/Residence"
oncommand="TutTB_LoadURL('http://residence.uniten.edu.my/residence')" />
</menupopup>
</toolbarbutton>
it doesnt work anymore.. i hv no idea wats wrong help me out thank you
here is the full code for it the .xul :
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://tuttoolbar/skin/tuttoolbar.css" type="text/css"?>
<overlay id="TutTB-Overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"
src="chrome://tuttoolbar/content/tuttoolbar.js" />
<toolbox id="navigator-toolbox">
<toolbar id="TutTB-Toolbar" toolbarname="Tutorial Toolbar" accesskey="T"
class="chromeclass-toolbar" context="toolbar-context-menu"
hidden="false" persist="hidden">
<toolbaritem flex="0">
<toolbarbutton id="TutTB-MainMenu" type="menu"
tooltiptext="Uniten Toolbar Main Menu">
<menupopup>
<menuitem label="Uniten Home Page" accesskey="U"
tooltiptext="Navigate to Uniten Website"
oncommand="TutTB_LoadURL('http://www.uniten.edu.my/')" />
<menuseparator />
<menuitem label="Current Student" accesskey="C"
tooltiptext="Navigate to Current Student (Under Uniten Website)"
oncommand="TutTB_LoadURL('http://www.uniten.edu.my/newhome/content_list.asp?CatID=214')" />
</menupopup>
</toolbarbutton>
</toolbaritem>
<toolbaritem id="TutTB-SearchTerms-TBItem" persist="width">
<menulist id="TutTB-SearchTerms" editable="true" flex="1"
minwidth="100" width="250"
onkeypress="TutTB_KeyHandler(event);">
<menupopup id="TutTB-SearchTermsMenu" onpopupshowing="TutTB_Populate()" />
</menulist>
</toolbaritem>
<splitter id="TutTB-ResizeSplitter" state="open" collapse="none"
resizebefore="closest" resizeafter="farthest"
tooltiptext="Resize the Search Box">
<vbox id="TutTB-ResizeBar" />
</splitter>
<toolbaritem flex="0">
<toolbarbutton id="TutTB-Combined-Button" label="Search"
type="menu-button" tooltiptext="Combined Search"
oncommand="TutTB_Search(event, 'web')">
<menupopup>
<menuitem id="TutTB-Combined-Web" label="Google Search"
class="menuitem-iconic" tooltiptext="Search Via Google"
oncommand="TutTB_Search(event, 'web'); event.stopPropagation();" />
<menuitem id="TutTB-Combined-Yahoo" label="Yahoo! Search"
class="menuitem-iconic" tooltiptext="Search Via Yahoo!"
oncommand="TutTB_Search(event, 'yahoo'); event.stopPropagation();" />
<menuitem id="TutTB-Combined-MSN" label="MSN Search"
class="menuitem-iconic" tooltiptext="Search Via MSN"
oncommand="TutTB_Search(event, 'msn'); event.stopPropagation();" />
</menupopup>
</toolbarbutton>
<toolbarseparator />
<toolbarbutton id="TutTB-Combined-Links" type="menu"
tooltiptext="Uniten Toolbar Main Menu">
<menupopup>
<menuitem label="Student Information" accesskey="S"
tooltiptext="Navigate to Serrano/Info"
oncommand="TutTB_LoadURL('http://info.uniten.edu.my/info')" />
<menuseparator />
<menuitem label="Subject Reg. & Aprt. Booking" accesskey="B"
tooltiptext="Navigate to Tioman/Online"
oncommand="TutTB_LoadURL('http://online.uniten.edu.my/online')" />
<menuseparator />
<menuitem label="Apartment (Aprt.) Registration" accesskey="A"
tooltiptext="Navigate to Tioman/Residence"
oncommand="TutTB_LoadURL('http://residence.uniten.edu.my/residence')" />
</menupopup>
</toolbarbutton>
<toolbarseparator />
<toolbarbutton id="TutTB-Combined-Coit" tooltiptext="Navigate To COIT Portal"
label="COIT Portal" oncommand="TutTB_LoadURL('http://coit.uniten.edu.my/')" />
</toolbaritem>
<toolbarspring />
</toolbar>
</toolbox>
</overlay>