Hi Barry, yeah that's basically what I have, except I don't use the hash because it keeps refreshing the page. As you can see in my previous post I've got it setting a field value before submitting, and then I expect it to trigger the onSubmit function - which it does, but then doesn't submit!
BB> is this what you mean? BB> <form action="xxx" method="post"> BB> <A href="#" onClick="this.form.submit();"> submit me</a> BB> </form> BB> are you sure you want a link? you can use any event of anything to submit BB> it... BB> just an idea BB> cheers BB> barry.b BB> -----Original Message----- BB> From: Taco Fleur [mailto:[EMAIL PROTECTED] BB> Sent: Friday, 3 October 2003 10:30 AM BB> To: CFAussie Mailing List BB> Subject: [cfaussie] RE: OT: javascript weirdness BB> Try debugging it by putting alert('1'); etc. after every check, see if the BB> js actually stops executing somewhere. BB> Also, not sure what your doing here BB> javascript:document.forms[0].fuseaction='blah' ? BB> Are you trying to set the target of the form? BB> Taco BB> -----Original Message----- BB> From: Toby Tremayne [mailto:[EMAIL PROTECTED] BB> Sent: Friday, 3 October 2003 10:32 AM BB> To: CFAussie Mailing List BB> Subject: [cfaussie] OT: javascript weirdness BB> Hi All, BB> here's a weird one - trying to use a link to submit a form. I have BB> a for tag that looks like this: BB> <form name="clientInfoForm" ..... onSubmit="return BB> checkClientInfo();"> BB> all present and correct, the function works fine with a submit BB> button in the form. However I have a custom tag producing links BB> like this: BB> <a href="javascript:void(0);" BB> onClick="javascript:document.forms[0].fuseaction='blah';document.forms[0].su bmit();">>Next</a> BB> Now when I click on the link, it DOES seem to submit the form, as BB> it triggers the checkClientInfo() function, which when it finds an BB> error, returns false and halts the submission. But if there are no BB> errors, it just doesn't submit!!! I've confirmed beyond doubt BB> that there are no javascript errors, yet I can't get this to work. BB> If I add a document.formName.submit(); to the above function, it BB> submits just fine (and in cases where I don't have a checking BB> function I use "<form .... BB> onSubmit="javascript:document.formName.submit();"> BB> Can anyone tell me why this is happening and what I can do to fix BB> it? I can't believe I need to submit the darn thing twice... BB> cheers, BB> Toby BB> -------------------------------- BB> Life is Poetry, BB> write it in your own words BB> -------------------------------- BB> Toby Tremayne BB> Cold Fusion Developer BB> Code Poet and Zen Master of the Heavy Sleep BB> Virtual Tours BB> +61 416 048 090 BB> ICQ: 13107913 BB> --- BB> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] BB> To unsubscribe send a blank email to BB> [EMAIL PROTECTED] BB> MX Downunder AsiaPac DevCon - http://mxdu.com/ BB> --- BB> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] BB> To unsubscribe send a blank email to BB> [EMAIL PROTECTED] BB> MX Downunder AsiaPac DevCon - http://mxdu.com/ BB> --- BB> You are currently subscribed to cfaussie as: [EMAIL PROTECTED] BB> To unsubscribe send a blank email to [EMAIL PROTECTED] BB> MX Downunder AsiaPac DevCon - http://mxdu.com/ -------------------------------- Life is Poetry, write it in your own words -------------------------------- Toby Tremayne Cold Fusion Developer Code Poet and Zen Master of the Heavy Sleep Virtual Tours +61 416 048 090 ICQ: 13107913 --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
