Rotating-dropdown-link-javascript thingie code
Created | Updated Jan 28, 2002
put this bit in the <HEAD>
*****************
<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>
***************
put this bit in the <BODY>
***************
<Olli/>
<form id="form">
<select id="site" size=1>
<option value="http://www.h2g2.com/U56404">Mr Cynic
<option value="http://www.h2g2.com/U50758">Lisa the Freak
<option value="http://www.h2g2.com/U97351">Hammythamster
<option value="http://www.h2g2.com/U38889">_Jinx_
<option value="http://www.h2g2.com/U106694">Joanna
<option value="http://www.h2g2.com/U86204">Kimotocat
<option value="http://www.h2g2.com/U46995">YK
<option value="http://www.h2g2.com/userpage.cgi">You ;-)
</select>
<input type=button value="Visit" onClick="javascript:formHandler()">
</form>
<script language="javascript">
<!-- Begin
function rotate() {
menu = document.form.site;
chosen = menu.selectedIndex;
menu.selectedIndex= (chosen == (menu.length-1)) ? 0 : chosen + 1;
setTimeout("rotate()",4000);
}
rotate();
// End -->
</script>
************************************************
By Olli
editing the >>setTimeout("rotate()",4000);<< number changes the time in miliseconds it takes to switch users
I made this script without looking at Zis guy's
give me a medal><>