Try debugging it by putting alert('1'); etc. after every check, see if the js actually
stops executing somewhere.
Also, not sure what your doing here javascript:document.forms[0].fuseaction='blah' ?
Are you trying to set the target of the form?
Taco
-----Original Message-----
From: Toby Tremayne [mailto:[EMAIL PROTECTED]
Sent: Friday, 3 October 2003 10:32 AM
To: CFAussie Mailing List
Subject: [cfaussie] OT: javascript weirdness
Hi All,
here's a weird one - trying to use a link to submit a form. I have
a for tag that looks like this:
<form name="clientInfoForm" ..... onSubmit="return
checkClientInfo();">
all present and correct, the function works fine with a submit
button in the form. However I have a custom tag producing links
like this:
<a href="javascript:void(0);"
onClick="javascript:document.forms[0].fuseaction='blah';document.forms[0].submit();">Next</a>
Now when I click on the link, it DOES seem to submit the form, as
it triggers the checkClientInfo() function, which when it finds an
error, returns false and halts the submission. But if there are no
errors, it just doesn't submit!!! I've confirmed beyond doubt
that there are no javascript errors, yet I can't get this to work.
If I add a document.formName.submit(); to the above function, it
submits just fine (and in cases where I don't have a checking
function I use "<form ....
onSubmit="javascript:document.formName.submit();">
Can anyone tell me why this is happening and what I can do to fix
it? I can't believe I need to submit the darn thing twice...
cheers,
Toby
--------------------------------
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/
---
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/