> I tried the following and it did not work. In the
> documentation of Coldfusion it did not include cfinput text
> fields as an object that coul do onClick. The following
> example did not work.
>
>
> <cfformitem type="script">
> function doFunction(ff) {
> if (ff == "00-00-0000") {
> ff.value = "";
> }
> else
> {
> alert("test")
> }
> }
> </cfformitem>
>
> <cfinput name="gDb" onClick="doFunction(gb);"
> mask="99-99-9999" validate="date" value="00000000"
> width="150" label="Date of Birth" message="Please enter your
> date of birth (Example: 05-07-1956)"/>
Your names aren't consistent - the field is named "gDb" but the function
call's argument is "gb". And in any case, your argument value should be
fully qualified: document.forms[0].gDb. Use the Javascript keyword "this"
for your argument value to avoid this sort of problem.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253657
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4