This example shows how not to trigger a
popup window, from the focus
event of an input field.
Opening unexpected popups is particularly intrusive for screenreader
users, who may not even realise at first that they're reading a
different page.
Although many browsers will block such a popup, many will not, since it would be considered a user-triggered event. The existence of popup-blockers cannot be considered sufficient to fix this issue.
The correct way to open popups is described in: JS_N_A3.
Tab or click into the field below, and a popup will attempt to open automatically:
The JavaScript code for this example can be found in: JS_N_A2.js