I want to make a button that performs such a a search using the contents of the firefox standard search box and the base url of the current navigation tab.
Something like:
- Code: Select all
/*CODE*/
loadURI("http://www.google.com/search?q=site:" + escape(document.getElementById("addressbar").value) + " " + escape(document.getElementById("searchbar").value));
Except document.getElementById("addressbar").value is not correct and it should be only the base of the URL, not the full URL (As an example, if your current URL is "http://custombuttons.sourceforge.net/forum/posting.php?mode=post&f=2", the base URL would be "custombuttons.sourceforge.net")