|
-
Nov 30th, 2001, 02:21 PM
#1
Thread Starter
PowerPoster
Form Post Method without the Send button
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.
-
Nov 30th, 2001, 03:06 PM
#2
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>
the image input becomes the submit button.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Nov 30th, 2001, 03:10 PM
#3
Frenzied Member
I would've just...
Code:
<div onclick="document.myForm.submit;"><img></div>
'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.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Nov 30th, 2001, 03:13 PM
#4
Just out of curiousity...
why go through all of that if there is a simple, one-line way to do it built in?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 1st, 2001, 01:09 AM
#5
Thread Starter
PowerPoster
Originally posted by crptcblade
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>
the image input becomes the submit button.
Thanks
crptcblade, are you into XML these days. Your syntax seems to be somewhat similar to what I know of XML.
-
Dec 1st, 2001, 01:13 AM
#6
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.
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.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
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
|