• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trigger an event

 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
If I have an input text field, when I click the text field, a small window is popped up. When I click an elememt in this popup window, a value is assigned to the text field programatically.
In this case, how can I trigger an event when the value of the text field is changed, assuming that I do not trigger an event from the popup window.
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The best way, if your popup window will not assign value to the element directly, but will call some function on an opener, that will do that.
For example, if now inside popup window:
opener.form.element.value = "aaa",
it should be setValue(opener.form.element.value,"aaa");
and in your main window you put your change handling into this function.
If, for some reason, you can not do that, you could have a function that checks, does value of a sertain element changed, and constantly call it using setInterval().
 
reply
    Bookmark Topic Watch Topic
  • New Topic