Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2002
    Posts
    143
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How can i trigger event when text box has been filled dynamically?

    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

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,965
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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();

  • #3
    Regular Coder
    Join Date
    Sep 2002
    Posts
    143
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,965
    Thanks
    0
    Thanked 236 Times in 233 Posts
    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?

  • #5
    Regular Coder
    Join Date
    Sep 2002
    Posts
    143
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes this is very global pupop , many useing it .
    can't change it only use it..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •