Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Copy field contents onChange

Guest
May 02, 2006 May 02, 2006
I have an ASP page that has two date fields, and next to each date field is a calendar icon that the user can click on to select a date from a calendar, which populates each respective date field. The page opens with both dates blank, but when the user selects Date1 (by clicking a Date button and selecting a date from a calendar), I want to auto-populate Date2 with the same date. How do I do that? I've looked at the "Set Text" Server Behavior, but when my JavaScript calendar populates the Date1 field (when the calendar popup window closes), the onChange event for the Date1 field doesn't run.

Thanks in advance. Rob
TOPICS
Server side applications
240
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 03, 2006 May 03, 2006
LATEST
You need to use a bit of javascript. eg.
document.yourform.text2.value = document.yourform.text1.value

Implement this as a function triggered by the onChange event for text1(or
whatever it is called).

Pat.


"robmoulton" <webforumsuser@macromedia.com> wrote in message
news:e39asf$8ng$1@forums.macromedia.com...
>I have an ASP page that has two date fields, and next to each date field is
>a
> calendar icon that the user can click on to select a date from a calendar,
> which populates each respective date field. The page opens with both
> dates
> blank, but when the user selects Date1 (by clicking a Date button and
> selecting
> a date from a calendar), I want to auto-populate Date2 with the same date.
> How
> do I do that? I've looked at the "Set Text" Server Behavior, but when my
> JavaScript calendar populates the Date1 field (when the calendar popup
> window
> closes), the onChange event for the Date1 field doesn't run.
>
> Thanks in advance. Rob
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines