Menu
I am wanting to add a variable and its value to the end of the URL of the loaded page. This variable is coming from a selectedIndex value on the page.
Here is my script:
function appendURL()
{
var scopeopt = document.searchtool.searchscope.options[document.searchtool.searchscope.selectedIndex].value;
new_url = window.location.href + “/searchscope=” + scopeopt;
window.location = new_url;
}
I would ideally like this to happen when the page loads, but only once obvisously.
Am I on the right track or is there a better way?
Thanks
Stu