469,270 Members | 1,149 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

event driven js in a form

so is it really possible to have a javascript app that runs when a
"go" button is clicked (ie requiring a <FORM> tag) inside a form with
a "submit" button? seems so simple, can't figure it out without doing
illegal nested forms.

cheers
dave
Jul 23 '05 #1
1 932
Dave,
I'd think you could create an input type="button", and then add this code
within the tag:
onClick="document.myformname.submit( )"

For that matter, you could create your own button to use:
<div style="width:135px; text-align:center;
background-color:gray; color:white; border:2px orange ridge;"
onClick="document.myform.submit( )"
onMouseover="this.style.backgroundColor='black', this.style.cursor='hand'"
onMouseout="this.style.backgroundColor='gray'">
Submit
</div>

Hope that helps!
Jim
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jonathan Rea | last post: by
4 posts views Thread by Deadly_M | last post: by
reply views Thread by Gary Shell | last post: by
4 posts views Thread by AzizMandar | last post: by
2 posts views Thread by John Kotuby | last post: by
15 posts views Thread by Phillip B Oldham | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.