document[formID][textInputID].disabled=true;

Adrian

-----Original Message-----
From: Chad Gray [mailto:[EMAIL PROTECTED]
Sent: 17 May 2007 14:41
To: CF-Talk
Subject: OT: javascript


I want to write a javascript function that I can use on all of my forms and
inputs to disable a text input.  So I want to pass to the function the
form's ID and the text input's ID to be disabled.

How do I append the functions attributes to my document command?

My javascript below does not work.


Function disabler(formID,textInputID) {

        document.formID.textInputID.disabled=true;

}

<form id="foo">
<input type="text" id="moo">
<input type="button" onClick="disabler('foo','moo');">
</form>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278445
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to