Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnChange Method Of Text Box Not Firing

Status
Not open for further replies.

moonoo

Programmer
May 17, 2000
62
0
0
US
Hi
I have a requirement like this . I have a Text Box and along it with a gif having a calender control . Normally the user can't type into the text box . If the User selects a date from the control the text box date will change . I want to fire a OnChange Event of the Text Box for some menu change depensing on the date changed . But its firing only in the stuation i change the date manually i.e i write into the text box in stead of selecting the date from the calender control . In all other cases the date within the text box chnages but the OnChange event does not fire.
How i can resolve this ? Any idea is appreciated.
Regards
 
You'll need to call the function immediately after the field is populated. The code is probably in your calendar control (which I assume is JavaScript).

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
I'm having the same problem.
What do you mean by "call the function immediately after the field is populated"?

I tried calling onChange in the calendar script after setting the value, and it doesn't work - gives an error "Object doesn't support this property or method" and then fails to close the popup window.

Tried setting focus to the textbox before updating, then blurring after updating. No errors, the window closes OK, but onChange still doesn't fire.

Also tried with the calendar in a div rather than a window, still have the same problems.


[purple][sub]"I think there is a world market for maybe five computers." - Thomas Watson, Chairman of IBM, 1943
"There is no reason anyone would want a computer in their home." - Ken Olson, founder of DEC, 1977
"640K ought to be enough for anybody." - Bill Gates, 1981[/sub][/purple]
(-:
 
Oh, certainwords...

It seems to work if you use "onchange" but not "onChange"???

argh... anyway, got it working

[purple][sub]"I think there is a world market for maybe five computers." - Thomas Watson, Chairman of IBM, 1943
"There is no reason anyone would want a computer in their home." - Ken Olson, founder of DEC, 1977
"640K ought to be enough for anybody." - Bill Gates, 1981[/sub][/purple]
(-:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top