Is there any to send data through POST method if I do not use the Submit button. I need to use image in place of the Send button.
Printable View
Is there any to send data through POST method if I do not use the Submit button. I need to use image in place of the Send button.
the image input becomes the submit button.Code:<form name="frmTest" method="POST" action="path/to/whatever.cgi">
<input type="text" name="txtTest" value="Hello"/>
<input type="image" src="image1.gif"/>
</form>
:)
I would've just...
'Course, the div may be optional. You might be able to just put the onclick event on the img tag. And I really would put the submit in a function and call the function, but you get the idea.Code:<div onclick="document.myForm.submit;"><img></div>
Just out of curiousity...
why go through all of that if there is a simple, one-line way to do it built in?
:)
ThanksQuote:
Originally posted by crptcblade
the image input becomes the submit button.Code:<form name="frmTest" method="POST" action="path/to/whatever.cgi">
<input type="text" name="txtTest" value="Hello"/>
<input type="image" src="image1.gif"/>
</form>
:)
crptcblade, are you into XML these days. Your syntax seems to be somewhat similar to what I know of XML.
Yeah, I used XML for a while, so I just got used to closing single tags. That way, if I needed to make a style sheet out of existing HTML, I don't need to go back and put them in anyway.Quote:
Originally posted by amitabh
Thanks
crptcblade, are you into XML these days. Your syntax seems to be somewhat similar to what I know of XML.
:)