ip23
08-28-2002, 03:46 PM
Hi I have been trying to write a simple function that will go to a certain page depending on the checkbox that someone clicks. At the moment it just submits to itself.
The function
==============
function pForm() {
page = document.login.page.value
if (page == "newuser") {
document.login.action = "newUser.asp";
document.login.submit();
}
else if (page == "returning") {
document.login.action = "userInfo.asp";
document.login.submit();
}
}
The form
==============
<form action="javascript:pForm();" method="post" name="login">
<input type="radio" name="page" value="newuser" checked>
<input type="radio" name="page" value="returning">
<input type="submit" value="Sign In">
Any help would be appreciated!
The function
==============
function pForm() {
page = document.login.page.value
if (page == "newuser") {
document.login.action = "newUser.asp";
document.login.submit();
}
else if (page == "returning") {
document.login.action = "userInfo.asp";
document.login.submit();
}
}
The form
==============
<form action="javascript:pForm();" method="post" name="login">
<input type="radio" name="page" value="newuser" checked>
<input type="radio" name="page" value="returning">
<input type="submit" value="Sign In">
Any help would be appreciated!