I want the user to enter a value via an Alert. Whether to block popup windows for the script. Is there a way to skip the input line if the user blocks popups?
I want the user to enter a value via an Alert. Whether to block popup windows for the script. Is there a way to skip the input line if the user blocks popups?
Could you detect if the window cannot be opened
Test For Popup Blocker Using JavaScript
evaluating the variable that the instance of the window will have.
You don't actually skip the line but run it and evaluate whether or not the window could be opened.
A recommendation, because you don't use popup implemented in jquery
Jquery UI Dialog
With this you will no longer have a problem of blocking the windows because it executes within it.
Another option, if the question you ask the user is very simple, instead of using a pop-up window use a
prompt
that is for that.