event driven js in a form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mammothman42

    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
  • SanJoseWebGuy

    #2
    Re: event driven js in a form

    Dave,
    I'd think you could create an input type="button", and then add this code
    within the tag:
    onClick="docume nt.myformname.s ubmit( )"

    For that matter, you could create your own button to use:
    <div style="width:13 5px; text-align:center;
    background-color:gray; color:white; border:2px orange ridge;"
    onClick="docume nt.myform.submi t( )"
    onMouseover="th is.style.backgr oundColor='blac k', this.style.curs or='hand'"
    onMouseout="thi s.style.backgro undColor='gray' ">
    Submit
    </div>

    Hope that helps!
    Jim

    Comment

    Working...