[RESOLVED]onChange event of a textbox to refresh another field help...
G'day,
Yep I'm new to javascript and I'm trying to refresh field2 when the textbox contents of field1 change. If I use this code:
_doClick('$Refresh', this, '_self', '#_RefreshKW_DateCheck')
it works when I click on the textbox and does refresh the field but how do you have it automatically refresh field2 when the contents of field1 change?
I'm looking for something other than _doClick I guess. Is there an _onChange? :D
BTW, the contents of the field1 (date field) are populated when the user selects a date from a date picker and then field1 is populated with something like 11/06/2006 and when this happens I want field2 (another hidden field) to refresh
Thanks alot for any help
Kidd
Re: onChange event of a textbox to refresh another field help...
Re: onChange event of a textbox to refresh another field help...
Thanks for the reply,
I have the onChange event but I'm not sure what to put in the event as javascript that will tell the other field to refresh.
Thanks
Kidd
Re: onChange event of a textbox to refresh another field help...
Well, that is entirely dependent on what you mean by refresh, and thus we really can't help you with it unless you provide more information.
Re: onChange event of a textbox to refresh another field help...
I think what is happening is that when the date field is populated using the date picker, it doesn't see it as an 'onChange' event which is why the other field won't refresh. The other field (field2) has Lotus Formula in it that looks up info in a view in a database to see if the date (that was populated in field1) exists. If it does then field2 returns "True" else "False"
I can't figure out why when field1 is populated with a date, the onChange event doesn't fire.
Kidd
Re: onChange event of a textbox to refresh another field help...
If it is indeed programmatically changed by settings its value property, the change event won't fire. Make the date picker fire the event. (There are various techniques for this - the simplest and most cross-browser is to just call the update function manually ;))
Re: onChange event of a textbox to refresh another field help...
:thumb: Thanks cornedbee. Thats what I tried and it works fine.
Thanks for your help
Kidd