File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trigger an event

 
Mike Yu
Ranch Hand
Posts: 175
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Yuriy Fuksenko
Ranch Hand
Posts: 413
  • 0
  • Mark post as helpful
  • send pies
  • 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().
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic