[TerraForm] Re: Event handler for calendar control

  • From: Matthew Walker <matthew@xxxxxxxxxxxxxxxxxxx>
  • To: terraform@xxxxxxxxxxxxx
  • Date: Fri, 02 Apr 2004 09:33:05 +1200

There is a way, but I haven't tested it thoroughly.

1) Open the file customtags/terraform/formats/includes/calendar.cfm .

2) Locate the function function showDate#calendarId#(y,m,d)

3) Add the following just before the }

<cfif structKeyExists(thisField, "onChange")>
    #thisField.onChange#
</cfif>

Note that the script loses its context. onchange="alert(this.value)" won't
work. But something like onchange="alert(document.MyForm.MyCalendar.value)"
will work. Note that you can't set an id for the calendar field, which is
annoying. Might need to address that....


Regards,
Matthew Walker
Electric Sheep Web
http://www.electricsheep.co.nz/

----- Original Message ----- 
From: "Jeff Page" <jpage@xxxxxxxxxxxxxx>
To: <terraform@xxxxxxxxxxxxx>
Sent: Friday, April 02, 2004 8:06 AM
Subject: [TerraForm] Event handler for calendar control


> Hey,
>
> I am trying to assign an event handler to a calendar control to trigger
> when the user selects a date from the popup calendar and the value in
> the underlying text field updates. OnChange works but only if the user
> types the date in by hand. How can I accomplish it when the user chooses
> the date?
>
> Thank you in advance for your help!
>
> Jeffrey Page
> Network Administrator
> YWCA of Dayton
> 937.461.5550 x151
>
>
>
>
>
>
>
>



Other related posts: