h2g2 Toolbar for Netscape 7/Mozilla Project

0 Conversations

This is a project to develop a toolbar add-on for Netscape 7+ and Mozilla 1.0+. The toolbar’s purpose is to assist users of these browsers when using h2g2.

References

Current Status

I have an XUL file containing the following code…


<?xml version="1.0"?>

<window
id="exampleXULWindow"
orient="horizontal"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<script>
function h2g2LoadPage(url){
// change the current loaded page
window.content.document.location.href=url;
}

function h2g2toolbarSearch(){
// get the menulist element
var mySearchMenuList = document.getElementById('h2g2toolbarSearchText');

// extract its value
var mySearchTerm = mySearchMenuList.value;

// create the search string
var mySearchString = "http://www.bbc.co.uk/h2g2/guide/Search?searchstring=" + mySearchTerm + "&amp;searchtype=goosearch";

// Add the search term to the menulist's dropdown
//
// insertItemAt ( index, label, value )
//
// We want to add it to the top of the drop down, so index 0.

mySearchMenuList.insertItemAt(0,mySearchTerm);

//load the search string
h2g2toolbarLoadPage(mySearchString);
}

</script>

<toolbox flex="1">
<toolbar id="h2g2-Toolbar">

<toolbarbutton id="h2g2toolbarMenu" label=" h2g2 " type="menu">
<menupopup>
<menuitem label="Front Page" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/')"/>
<menuitem label="Life" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/C72')"/>
<menuitem label="The Universe" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/C73')"/>
<menuitem label="Everything" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/C74')"/>
<menuseparator/>
<menuitem label="Dont Panic" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/dontpanic')"/>
<menuitem label="Feedback" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/Feedback')"/>
<menuitem label="Announcements" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/Announcements')"/>
<menuseparator/>
<menuitem label="Peer Review" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/PeerReview')"/>
<menuseparator/>
<menuitem label="The Post" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/ThePost')"/>
<menuseparator/>
<menuitem label="Smileys" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/Smiley')"/>
</menupopup>
</toolbarbutton>

<toolbarbutton id="dnatoolbarMenu" label=" DNA " type="menu">
<menupopup>
<menuitem label="Front Page" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/')"/>
<menuitem label="Announcements" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/Announcements')"/>
<menuseparator/>
<menuitem label="Feedback" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/Feedback')"/>
<menuitem label="Knowledge Base" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/Help')"/>
</menupopup>
</toolbarbutton>

<toolbarbutton id="guidemltoolbarMenu" label=" GuideML " type="menu">
<menupopup>
<menuitem label="GuideML Clinic" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/A787016')"/>
<menuitem label="Introduction" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/GuideML-Introduction')"/>
<menuitem label="Syntax" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/GuideML-Syntax')"/>
<menuitem label="Special Character Codes" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/GuideML-Characters')"/>
<menuitem label="FAQ" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/hub/GuideML-FAQ')"/>
<menuseparator/>
<menuitem label="Approved GuideML" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/A264520')"/>
<menuitem label="Picture Library" oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/GuideML-PictureLibrary')"/>
</menupopup>
</toolbarbutton>

<toolbarbutton id="myuserspace" label=" My Space " oncommand="devedgetoolbarLoadPage('http://www.bbc.co.uk/dna/h2g2/U150533')" />

<menulist id="h2g2toolbarSearchText" editable="true" onkeypress="if(event.keyCode == 13) {h2g2toolbarSearch();}"
minwidth="160">
<menupopup>
<menuitem label="Life"/>
<menuitem label="The Universe"/>
<menuitem label="Everyting"/>
</menupopup>
</menulist>

</toolbar>
</toolbox>
</window>


Bookmark on your Personal Space


Conversations About This Entry

There are no Conversations for this Entry

Entry

A880229

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

References

External Links

Not Panicking Ltd is not responsible for the content of external internet sites

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more