Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1288 When clicking on another window or frame, a form fields onChange event handler is not triggered, is there a way to detect changes?

irt.org | Knowledge Base | JavaScript | Form | Q1288 [ previous next ]

Q1288 When clicking on another window or frame, a form fields onChange event handler is not triggered, is there a way to detect changes?

Try using the onBlur event handler to check the current value of the form with a value captured using the onFocus event handler for the form field:

<form>
<input type="text" onFocus="window.temp=this.value" onBlur="if (window.temp != this.value) alert('Changed')" onChange="alert('Changed')">
</form>

However, if used normally both events will trigger the alert.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.