|
-
Mar 11th, 2002, 06:02 AM
#1
Thread Starter
Addicted Member
submitting a form with <A>
Hello,
The following code doesn't work with Netscape 6.2, while it works with IE, what is the problem
<FORM method="post" name="Form1">
<INPUT type="hidden" name="ReportType">
<A name="0">
<A href="#0" onClick='javascript:Form1.item("ReportType").value=1;Form1.action="Report_Details.asp";Form1.submit( )'>Report1</A> <BR><BR>
<A href="#0" onClick='javascript:Form1.item("ReportType").value=2;Form1.action="Report_Details.asp";Form1.submit( )'>Report2</A> <BR><BR>
</FORM>
-
Mar 11th, 2002, 06:48 AM
#2
PowerPoster
hi
Code:
<script language="javascript">
function SubMitForm(theForm,intvalue)
{
document.theForm.ReportType.value = intValue;
document.theForm.submit();
}
</script>
and in the form part do this:
<form name="form1" action="Report_Details.asp" >
<INPUT type="hidden" name="ReportType">
<A href="Javascript:SubMitForm(document.form1,1);">Report1</A> <BR><BR>
<A href="Javascript:SubMitForm(document.form1,2);">Report2</A> <BR><BR>
</FORM>
Hope this hleps...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|