[thelist] [help] image connected to a submit function w/ javascript embedded

Jason Fields jason at v1c.net
Mon Nov 13 23:18:10 CST 2000


greetings...

i am stuck in the midst of building a html form with a graphic submit
button.... to start... I have a javascript function in the action statement
of the form... see below...

<form action="formmail.pl" method="POST" onSubmit="javascript:winPop2()">

additionally I would like to have a graphic 'submit' button of my own devise
be the trigger to post data to the form... the form cgi i am using is a
standard 'formmail.pl' and has some basic html print statements to
deliver the form results... which are a re-iteration of whatever was
entered...

where it stands now... if i add the graphic image and reference it properly
as noted in all of the html resources online... see below...

<input type="image" src="button.gif" height="11" width="123">

upon clicking the button... submission of the form the results sent back are
ONLY the coordinates of where I clicked the button graphic (ie. form.x: 44
form.y: 2)... and not the contents of the form itself (ie. name: john doe,
email: john at doe.com, company: acme identities, comments: none )...

upon further research I found that if I trigger the form submission using an
href with javascript... as in the code below...

<a href="javascript:document.myform.submit()">
<img src="button.gif" height="11" width="123">
</a>

the code in the action statement will not work...

sooo... i am stuck... any ideas, suggestions, examples, links, etc would be
very helpful...the ultimate goal is to have the form results posted in a new
pop window once the user clicks on the submit button graphic...

btw... the i dont know perl well enough to modify the cgi to accommodate for
any of this... my knowledge is just enough to be dangerous behind the
wheel... but not enough to dodge pedestrians if the brakes go out...

thanks in advance...

regards,
jason fields.


------------------------------
v1 consulting
1730 20th street, lower unit
san francisco, ca 94107 usa

+1.415.642.2808  office.us
+1.415.823.5353  mobile.us
+1.603.697.8394  efax.us

+44.7092.21.1995 mobile.ec

http://www.v1c.net/
mailto:jason at v1c.net
------------------------------





More information about the thelist mailing list