[thelist] Cold Fusion - using onClick to submit a form with hidden fields

Joshua Olson joshua at alphashop.net
Thu Dec 13 11:48:16 CST 2001


William,

Question 1:  Do you have an element named submit, by chance?  If, so,
that'll mess you up every time when you are trying to do something like
this.

Your best bet to manually submit a form is to use the full DOM name of the
form, such as:

document.forms.myform.submit();

add a name="myform" and id="myform" to the form tag.

The hidden form fields should have absolutely no effect so long as the names
of the fields are not reserved words, such as "submit", etc.

HTH,

-joshua


----- Original Message -----
From: "William Kolean" <williamkolean at mac.com>
Subject: [thelist] Cold Fusion - using onClick to submit a form with hidden
fields


: I am having trouble using onClick in an href to execute JavaScript code
and
: then submit a form using Cold Fusion 4.5. It works fine until I add hidden
: form fields, and then I get a JavaScript "Object doesn't support this
: property or method" error. After doing a google search I found a partial
: solution using <a href="javascript.eventInput.submit()"
: onClick="updateParentID()">Update</a>, however this only works if the href
: is outside of the form tags. Does anyone have any idea how I could modify
: this to work when it is placed inside the form tags?
:
: William
: williamkolean at mac.com







More information about the thelist mailing list