Aug 7, 2003 #1 aarrgghh Technical User Sep 5, 2002 60 US Hey all, I need to have multiple image submit buttons on a page, and I need to pass different values, via GET or POST, based on the button clicked. Thanks in advance
Hey all, I need to have multiple image submit buttons on a page, and I need to pass different values, via GET or POST, based on the button clicked. Thanks in advance
Aug 7, 2003 #2 adam0101 Programmer Jun 25, 2002 1,952 US <form method="GET"> <input type="hidden" name="h1"> <input type="image" onclick="this.form.h1.value='test1'"> <input type="image" onclick="this.form.h1.value='test2'"> Adam Upvote 0 Downvote
<form method="GET"> <input type="hidden" name="h1"> <input type="image" onclick="this.form.h1.value='test1'"> <input type="image" onclick="this.form.h1.value='test2'"> Adam
Aug 7, 2003 1 Thread starter #3 aarrgghh Technical User Sep 5, 2002 60 US Thanks for the response. All I am getting is: http://www.website.com/index.htm?nav=++&x=31&y=6 And the 31 and 6 change depending on where the button is clicked. Upvote 0 Downvote
Thanks for the response. All I am getting is: http://www.website.com/index.htm?nav=++&x=31&y=6 And the 31 and 6 change depending on where the button is clicked.
Aug 7, 2003 #4 adam0101 Programmer Jun 25, 2002 1,952 US Can you post the code you're using? Adam Upvote 0 Downvote
Aug 8, 2003 Thread starter #5 aarrgghh Technical User Sep 5, 2002 60 US Here's what I have tried: // method one function name(){ document.form.control.value = 'value'; document.form.submit(); // I have also used "return false" here } <form method="GET"> <img src="image" onClick="name()" </form> // method two <form method="GET"> <input type="hidden" name="h1"> <input type="image" onclick="this.form.h1.value='test1'"> <input type="image" onclick="this.form.h1.value='test2'"> Any other ideas? Thanks again. Upvote 0 Downvote
Here's what I have tried: // method one function name(){ document.form.control.value = 'value'; document.form.submit(); // I have also used "return false" here } <form method="GET"> <img src="image" onClick="name()" </form> // method two <form method="GET"> <input type="hidden" name="h1"> <input type="image" onclick="this.form.h1.value='test1'"> <input type="image" onclick="this.form.h1.value='test2'"> Any other ideas? Thanks again.
Aug 8, 2003 Thread starter #6 aarrgghh Technical User Sep 5, 2002 60 US OK now I have it working in Firebird and IE, but not Netscape. Here is the code I am using. function funk(){ window.document.form1.control.value = "value"; window.document.form1.submit(); } <form method="GET"> <input type="hidden"> <img src="images/back.gif" onClick="funk()"> </form> Any reason why this isn't working in Netscape? Thanks Upvote 0 Downvote
OK now I have it working in Firebird and IE, but not Netscape. Here is the code I am using. function funk(){ window.document.form1.control.value = "value"; window.document.form1.submit(); } <form method="GET"> <input type="hidden"> <img src="images/back.gif" onClick="funk()"> </form> Any reason why this isn't working in Netscape? Thanks
Aug 8, 2003 Thread starter #7 aarrgghh Technical User Sep 5, 2002 60 US Got it. No onClick available for Netscape 4.7. Need to <a href="3" onClick="funk()"><img src></a> Upvote 0 Downvote
Got it. No onClick available for Netscape 4.7. Need to <a href="3" onClick="funk()"><img src></a>
Aug 8, 2003 #8 adam0101 Programmer Jun 25, 2002 1,952 US Star for troubleshooting your own problem Adam Upvote 0 Downvote