Also, one usually uses the form's onsubmit event, rather than the submit button's onclick event. This allows for other ways of submitting the form (e.g. pressing enter). In addition to this, you should really give an action in plain HTML first, for non-Javascript browsers.
Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function ActionDeterminator() {
document.forms['login'].action = document.forms['login'].elements['location'].value;
return true;
}
</script>
</head>
<body>
<form name="login" method="POST" action="http://69.90.113.202/Templates/Default/login.aspx" onsubmit="return ActionDeterminator();">
<table border="0" align="center" id="table1">
<tr>
<td><strong>User:</strong></td>
<td><input type="text" name="USERID" size="20"></td>
</tr>
<tr>
<td height="27"><strong>Password</strong>:</td>
<td><input type="password" name="PASSWORD" size="20"></td>
</tr>
<tr>
<td height="59" valign="top"><strong>Location:</strong></td>
<td valign="middle">
<input name="location" value="http://69.90.113.202/Templates/Default/login.aspx" type="radio" checked="true"/> Chicago<br>
<input type="radio" value="http://panel.greatlakegaming.net/Templates/Default/login.aspx" name="location"/>
New York<br>
</td>
</tr>
</table> <p> </p>
<p align="center">
<input type="submit" value="Submit" name="B1"/>
<input type="reset" value="Reset" name="B2"/>
</p>
</form>
</body>
</html>
Bookmarks