I am using javascript alert message to show validation messages. In Firefox and Chrome first time working fine,second time for same alert same its asking message like "Prevent this page from creating additional dialogs" with check box. After select that check box, Next time button click scripts not executing. How to block that message?
-
2Impossible. It's browsers feature to block unwanted alerts. You may use modal windows to show your message. – Lixas Apr 15 '14 at 06:30
-
1@user3405630 - Use comments instead of editing the answers! – Ramesh Apr 15 '14 at 06:36
-
question heading doesn't match with question – Govind Singh Apr 15 '14 at 06:53
-
@Govind-After select that checkbox scripts not running. – KSEL Apr 15 '14 at 06:55
-
@Ramesh..Thanks Ramesh.I am new to Stack.Hererafter i will use that . – KSEL Apr 15 '14 at 06:56
-
If any postback happens means that message not showing.What happening in browser while postback?.we can do that manually in javascript? – KSEL Apr 15 '14 at 07:38
4 Answers
its a browser property for the client,if he doesnt want to view these alerts. you cant remove that check box and message.
if this message is shown then what the problem, leave it for the user.
why you want to force him to view these alerts, it must be user's wish to see or not see these alerts.
for better user experience and for your purpose you can use fancybox
or facebox
fancy box fiddler check this http://jsfiddle.net/BJNYr/

- 15,282
- 14
- 72
- 106
This is a browser matter, so you as a developer cant do anything with that behavior.
Here is a similar question already answered here
unfortunately you can't be sure that user has his browser settings with javascript alerts popup on ( that called with 'alert('...') function'). You should use javascript dialog plygin instead. For example: http://fancybox.net/

- 2,072
- 20
- 17