Asim
10-21-2003, 02:02 AM
Hi
I have a problem with form submit. I am new to Javascript and dont know the exact syntex. I have two form action 1) is when user change the combo, form submit itself and 2) is an image and when user clicks it has to sumbitted on next page. My page name is category.asp so in formaction I used this name to submit the form itself and on image click event I used the javascript. the combo is working perfect but image click is not working. My code is as follows
<script language="JavaScript">
function SubmitForm()
{
document.a.action = "style.asp"
document.a.submit();
}
</script>
<form action="category.asp" method="post" name="a">
<select class="PulRtxt" onchange="form.submit()" size="1" name="categoryid">
<option categoryid=1>ABC</option>
</select>
<input src="go.gif" name="I1" onClick="SubmitForm()" type="image">
</form>
Pls Help me
Thanks in advance
Asim
I have a problem with form submit. I am new to Javascript and dont know the exact syntex. I have two form action 1) is when user change the combo, form submit itself and 2) is an image and when user clicks it has to sumbitted on next page. My page name is category.asp so in formaction I used this name to submit the form itself and on image click event I used the javascript. the combo is working perfect but image click is not working. My code is as follows
<script language="JavaScript">
function SubmitForm()
{
document.a.action = "style.asp"
document.a.submit();
}
</script>
<form action="category.asp" method="post" name="a">
<select class="PulRtxt" onchange="form.submit()" size="1" name="categoryid">
<option categoryid=1>ABC</option>
</select>
<input src="go.gif" name="I1" onClick="SubmitForm()" type="image">
</form>
Pls Help me
Thanks in advance
Asim