Hi lads,
I have a html form, a select list, a textfield and a submit button. Depending on what value is chosen in the select I want the form to be submitted to a different page. My js runs along these lines:
choice is the value from select list
if(choice=="1")
document.form1.action = "http://....";
document.form1.submit();
else
if(choice=="2")
document.forms.action = "http://..";
document.forms.submit();
I am getting a syntax error on the submit() line-does any1 have any ideas what might cause this, the action attribute in the <form> tag is blank(not there)
Thanks in advance,
Ken
I have a html form, a select list, a textfield and a submit button. Depending on what value is chosen in the select I want the form to be submitted to a different page. My js runs along these lines:
choice is the value from select list
if(choice=="1")
document.form1.action = "http://....";
document.form1.submit();
else
if(choice=="2")
document.forms.action = "http://..";
document.forms.submit();
I am getting a syntax error on the submit() line-does any1 have any ideas what might cause this, the action attribute in the <form> tag is blank(not there)
Thanks in advance,
Ken
Comment