Basic Java scipt question?

Thread Starter

rougie

Joined Dec 11, 2006
410
Hello,

In notepad I created a file called "indexScriptVars.html" and it contains the following code:

====================
<script type="text/javascript">
var name="Tony";
alert(name);
name="bob";
alert(name);
</script>
====================

After the line 'name=bob', why does the alert display a check box saying:

"Prevent this page from creating additional dialogues" ???

as show in the attachment below??

r
 

Attachments

nerdegutta

Joined Dec 15, 2009
2,684
My guess:

Since you are displaying two nearly equal alert boxes. The browser ask if you will continue to display those alerts. I think it's an browser issue, not a code issue.

BTW: Why is not bob with capital B...?
 

kubeek

Joined Sep 20, 2005
5,795
This is because there used to be annoying pages which showed like 50 of these boxes one after another saying some stupid message, until they finally let you go, so this way you can stop it in the beginning. Older browsers will not do this.
 

Thread Starter

rougie

Joined Dec 11, 2006
410
Hi kubeek,

Is there any way to turn this feature off in google chrome...? God knows I tried but couldn't find it !!!

r
 
Top