Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1322 How can I ensure that the change event it tripped for an amended form field, even if the user changes the focus to another frame?

You are here: irt.org | FAQ | JavaScript | Form | Q1322 [ previous next ]

Use the onFocus event handler in the other frame to set the focus back to the original frame. This will then cause the chnage event to fire for the amended form field:

Original frame:

<form>
<input type="text" onChange="alert('changed')">
</form>

In the other frame:

<body onFocus="parent.originalFrameName.focus()">

©2018 Martin Webb