Hi all,
I’m a newbie. I want a js that will have the user select from a drop down list a venue, then enter their username in one textbox, and password in another, so they’re taken to /venue/username/password.html. Eg. If the soccer player frankie has password 1111, he’ll be taken to /soccer/frankie/1111.html.
My code at the moment is this:
<!– Begin
site = “
function combineMenus(frm, menu1, text1, text2) {
with (frm) {
str = menu1.options[menu1.selectedIndex].value;
str += text1.options[text1.selectedIndex].value;
str2 += text2.options[text2.selectedIndex].value;
url = site + “/” + str + “/” + str2 + “.html”;
window.location.href = url;
}
}
// End –>
</script>
</head>
<body
<center>
<form name=”menufrm”>
<select name=”menu1″>
<option value=””>Venue</option>
<option value=”actiondance”>Action Dance</option>
<option value=”larool”>Larool</option>
<option value=”ststephens”>St Stephens</option>
</select>
<input name=”text1″ value=”” type=”text”> <input name=”text2″
value=”” type=”text”> <input value=”Select”
onclick=”combineMenus(this.form, this.form.text1, this.form.text2)”
type=”button”></form>
</center>
<p><br>
</p>
</body>
</html>
Any ideas? Thanks in advance, really appreciate any help for a poor boy down under
Doric