Forum Moderators: open

Message Too Old, No Replies

What does this Javascript do please?

Wondering if I can delete it

         

1Lit

7:49 pm on Jul 9, 2005 (gmt 0)

10+ Year Member



I have this script in the header of numerous pages of my site. The site was constructed a few years ago and now I can't remember what it does:


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>

Anyone have an idea? Cheers :)

Birdman

8:12 pm on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It looks like a jump menu; the type which you select a link from a form <select> dropdown and then you are sent directly to the page when you select. If you have don't have a drop menu like that, then you're safe to remove it.

whoisgregg

8:12 pm on Jul 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Looks like you have a drop down navigation menu somewhere on your site... This script, when called, get's the URL from the selected option and takes the user to that page.

Added: Birdman beat me to it. :)