I've seen this happening, never really got to the cause of it... looks like a FORM fires the onSubmit() only via a SUBMIT button, the only way I found was to call a JS function onClick of the link/button, validate and then if happy, submit with form.submit()...
Sorry, not much help I know! ----- Original Message ----- From: "KNOTT, Brian" <[EMAIL PROTECTED]> To: "CFAussie Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, February 24, 2004 3:02 PM Subject: [cfaussie] RE: Javascript problem > It submits the correct form, as it goes to the correct page, it just ignores > the onsubmit attribute in the form tag. In the below code clicking on the > add will direct the browser to addsi.cfm. It does not do the > onsubit="test_alert", which pops an alert box that says test. If I replace > the add link with a normal input type="submit" then it all works. > > Brian > > <form action="addsi.cfm" method="post" name="siDetailsAdd" > onSubmit="test_alert()"> > > <a href="#" onClick="document.siDetailsAdd.submit()" class="link">Add</a> > > </form> > > > -----Original Message----- > > From: Steve Baty [SMTP:[EMAIL PROTECTED] > > Sent: Tuesday, 24 February 2004 13:56 > > To: CFAussie Mailing List > > Subject: [cfaussie] RE: Javascript problem > > > > Brian, > > > > You may need to specify the form to submit, either by > > onclick(this.submit()), or onclick(document.formname.submit()); > > > > Not sure that will help, but worth a shot... > > > > Cheers > > Steve > > > > ----------------------------------- > > Steve Baty - senior analyst > > p: 612 8596 4030 > > m: 0417 061 292 > > f: 612 8596 4001 > > e: steve @redsquare.com > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of KNOTT, > > Brian > > Sent: Tuesday, 24 February 2004 2:53 PM > > To: CFAussie Mailing List > > Subject: [cfaussie] Javascript problem > > > > Not sure how many people are out there with MXDU on but I have a > > javascript > > problem. > > > > I have a onsubmit attribute in my form tag but If I use a link and do a > > onclick(submit()) it ignores the onsubmit in the form tag. > > > > There are 3 forms on the page but they all have separate form tags, not > > sure > > if these are causing the problem. > > > > Brian Knott > > > > > > > > > > ------------------------------------------------------------------------ > > ----------- > > > > The contents of this message are the views of the Author and do not > > necessarily reflect the views of SUNCORP METWAY LTD ABN 66 010 831 722. > > > > > > The content of this e-mail, including attachments is a confidential > > communication between the Suncorp Metway Group and the intended > > addressee. Any unauthorised use of the contents is expressly prohibited. > > If you have received this e-mail in error please contact the sender > > immediately and then delete the message and any attachment(s). > > > > http://www.suncorp.com.au > > > > > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to > > [EMAIL PROTECTED] > > > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > http://www.mxdu.com/ + 24-25 February, 2004 > > > > > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to > > [EMAIL PROTECTED] > > > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > > http://www.mxdu.com/ + 24-25 February, 2004 > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to [EMAIL PROTECTED] > > MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia > http://www.mxdu.com/ + 24-25 February, 2004 > > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia http://www.mxdu.com/ + 24-25 February, 2004
