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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ontextchanged event not firing

Status
Not open for further replies.

MaddogC

Programmer
Dec 4, 2003
134
GB
I have a text box that contains a date of birth. Next to the text box I have a button that opens a calendar popup to pick the date of birth. This is done in Javascript.

The popup window returns a value to the main window thus:

Link.Attributes.Add("href", [String].Format("JavaScript:window.opener.document.{0}.value = '{1:d}'; window.close();", Request.QueryString("field"), e.Day.Date))

My problem is that when the value in the date of birth text box changes, I want a box below that displays the age to update. The OntextChanged event is not firing though.

The Age box is updated correctly if I type in a date of birth and then tab off the field. Any suggestions for a workaround please?


 
You'll have to set the focus of the opening window to whatever is the next tab item.

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
No luck i'm afraid. If I change the date using the date picker then click on another field, nothing is fired. If I change it manually, then tab off it is fired.
 
Rather tan try to fire the OntextChanged event, can't you just have a javascript function that works out the age? You could call this javascript function easily enough once the date had been entered.

--------------------------------------------------------------------------------------------------------------------------------------------

Need help finding an answer?

Try the search facility ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top