![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello I'm trying to learn to how to use an image as a submit button. I'm using the example found at http://www.webdevelopersnotes.com/tips/html/21.php3 My original submit syntax: input type="submit" name="submit" value="SubmitOrder"><input type="hidden" name="config" value="0" / contains: input type name="config" and value="0" /> that is required by my PHP script. Using the new Image submit syntax: form name="orderform"><a href="javascript:document.orderform.submit()" onclick="return val_form_this_page()"><img src="prepay.gif" border="0" ALT="Submit Order"></A I can't find a place for the equivalent of <input type="hidden" name="config" value="0" / I have tried it in different places but it fails. Any suggestions appreciated. |
#3
| |||
| |||
|
|
Kim wrote: Hello I'm trying to learn to how to use an image as a submit button. I'm using the example found at http://www.webdevelopersnotes.com/tips/html/21.php3 My original submit syntax: input type="submit" name="submit" value="SubmitOrder"><input type="hidden" name="config" value="0" / contains: input type name="config" and value="0" /> that is required by my PHP script. Using the new Image submit syntax: form name="orderform"><a href="javascript:document.orderform.submit()" onclick="return val_form_this_page()"><img src="prepay.gif" border="0" ALT="Submit Order"></A I can't find a place for the equivalent of <input type="hidden" name="config" value="0" / I have tried it in different places but it fails. Any suggestions appreciated. Hi Kim, I found a good discussion of using images as submit buttons here: http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html If you still want to use an image button to submit your form, the page has a code example. Read "Notes on the JavaScript surrogate" to see why it points to a "fail.html" page. There is also code to use to have a button rollover effect "Rollover effects". The hidden field can go anywhere in your form. You can place all of the hidden fields you need anywhere in the form. form name="orderform" input type="hidden" name="config" value="0" / a href="fail.html" onclick="document.myform.submit();return false;" img alt="Submit Order" src="prepay.gif" border="0"></a /form Will that work for you? Mike |
#4
| |||
| |||
|
|
"mscir" <mscir (AT) yahoo (DOT) com> wrote in message news:lLWdnXlRGITbrareRVn-gw (AT) pghconnect (DOT) com... Kim wrote: Hello I'm trying to learn to how to use an image as a submit button. I'm using the example found at http://www.webdevelopersnotes.com/tips/html/21.php3 My original submit syntax: input type="submit" name="submit" value="SubmitOrder"><input type="hidden" name="config" value="0" / contains: input type name="config" and value="0" /> that is required by my PHP script. Using the new Image submit syntax: form name="orderform"><a href="javascript:document.orderform.submit()" onclick="return val_form_this_page()"><img src="prepay.gif" border="0" ALT="Submit Order"></A I can't find a place for the equivalent of <input type="hidden" name="config" value="0" / I have tried it in different places but it fails. Any suggestions appreciated. Hi Kim, I found a good discussion of using images as submit buttons here: http://www.cs.tut.fi/~jkorpela/forms/imagebutton.html If you still want to use an image button to submit your form, the page has a code example. Read "Notes on the JavaScript surrogate" to see why it points to a "fail.html" page. There is also code to use to have a button rollover effect "Rollover effects". The hidden field can go anywhere in your form. You can place all of the hidden fields you need anywhere in the form. form name="orderform" input type="hidden" name="config" value="0" / a href="fail.html" onclick="document.myform.submit();return false;" img alt="Submit Order" src="prepay.gif" border="0"></a /form Will that work for you? Mike Mike I tested the <input type="hidden" name="config" value="0" /> elsewhere in my "form", it still didn't work. I received the same "No form data has been sent to the script" error message. My <input type="hidden" name="config" value="0" /> can't really go "anywhere" in my form. The same form is sent to 2-3 different places depending on payment method. In payment method 2, <input type="hidden" name="config" value="1" /> is used, and so on... Originally, this line was in two separate Submits: <input type="submit" name="submit" value="SubmitOrder"><input type="hidden" name="config" value="0" / There is apparently somthing wrong in my Javascript. Thanks for your time. Ok Mike |
|
value="0" /> line. I'll be using value=variable to change from 0-3. |
#5
| |||
| |||
|
|
I tested the <input type="hidden" name="config" value="0" /> elsewhere in my "form", it still didn't work. I received the same "No form data has been sent to the script" error message. My <input type="hidden" name="config" value="0" /> can't really go "anywhere" in my form. The same form is sent to 2-3 different places depending on payment method. In payment method 2, <input type="hidden" name="config" value="1" /> is used, and so on... Originally, this line was in two separate Submits: <input type="submit" name="submit" value="SubmitOrder"><input type="hidden" name="config" value="0" / There is apparently somthing wrong in my Javascript. Thanks for your time. Ok Mike I understand now, I can only have one <input type="hidden" name="config" value="0" /> line. I'll be using value=variable to change from 0-3. |
![]() |
| Thread Tools | |
| Display Modes | |
| |