Jamie:
have it disabled as it renders (ie: pre-set in the code) and use an onClick
(onSelected for list boxes, etc) to enable it.
example: clicking in the textbox will enable the button
<form name="theForm" action="" method="get"><input name="theText" type="text"
value="theValue" onClick="turnMeOn(theForm.theButton)">
<input name="theButton" type="button" disabled="true" value="theValue" >
</form
using simple JS like this does all the hard work
<script language="JavaScript">
function turnMeOn(element){
element.disabled = false
}
</script>
cheers
Barry Beattie
CF Web Developer
Alpha Business Systems
[EMAIL PROTECTED]
�
Ph: +61 07 3216 0999
�
Unit 1, 31 Thompson Street
Bowen Hills QLD 4006
www.alphabus.com.au
�
Virus Disclaimer: blah...
Confidentiality: blah...
-----Original Message-----
From: Jamie Lawrence Jenner [mailto:[EMAIL PROTECTED]
Sent: Friday, 11 June 2004 3:54 AM
To: CFAussie Mailing List
Subject: [cfaussie] disable form elements
hi,
I know its not cf but i really need help
I have a form which has three questions
1 MOT = checkbox = yes, checkbox = no
motday - motmonth - motyear
2 Tax = checkbox = yes, checkbox = no
taxday - taxmonth - taxyear
3 Warranty = checkbox = yes, checkbox = no
Warday - Warmonth - Waryear
basically waht i need is for the date selectores to all be set to disabled
when the form loads. Then if a user clicks on the yes checkbox, the dates
for that qustion enable.
i have found many scripts to do this with single elements, but not to
unlock three form elements.
Ideally what i need is a function whcih can be passed x amounts of for
elements, then loop through it and dsable, enable the form elements passed
I have spent ages trying to do it myself but i have only used js a couple
of times!
cheers in advance
jamo
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/