...

View Full Version : How can i trigger event when text box has been filled dynamically?



frontline
10-22-2003, 11:03 AM
Hello
i have an input text filed that is filled dynamically from popup window
(the page white the text filed is the opener) now im looking for some kind of event
that will trigger me when i the text filed is filled with string . without timers and such..
thanks

glenngv
10-22-2003, 11:25 AM
put an onchange event handler in the field:

<input name="myfield" onchange="doSomething()">

then in the popup:

document.myform.myfield.value="blah";
document.myform.myfield.onchange();

but I think that will only work in IE

so to make it cross-browser, after setting the value of myfield, call the function in the onchange handler manually.

document.myform.myfield.value="blah";
window.opener.doSomething();

frontline
10-22-2003, 11:42 AM
well the thing is i can't insert new code to the popup window
(its generic popup im not allowed to teach) so this is infect my problem
is there any way that the input text filed will fire event when there is string
inserted inside it? (remember no timers..)
thanks

glenngv
10-22-2003, 11:47 AM
with no timers and no modification to the popup, I think you cannot do something about it.

May I know why you can't modify the code in the popup?

frontline
10-22-2003, 11:49 AM
yes this is very global pupop , many useing it .
can't change it only use it..



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum