Forum Moderators: open
The window.prompt script method is blocked and the gold Information bar is displayed by default in Internet Zone for Internet Explorer 7. The helps prevent websites from spoofing things such as the logon screens of other websites. This is a new security enhancement for Internet Explorer 7.
What is Microsoft thinking?!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset:utf-8">
<title>window.prompt example for IE7</title>
<script type="text/javascript">
var page = function() {
return {
init : function() {
// Prompt User
var userinput = prompt("Enter some value","Your Value Here");
// Use this value for something
var p = document.createElement("p");
var n = document.createTextNode(userinput);
var c = document.getElementById("container");
p.appendChild(n);
c.appendChild(p);
}
};
}();
window.onload = page.init;
</script>
</head>
<body>
<div id="container">
</div>
</body>
</html>
- John
[edited by: JAB_Creations at 11:11 pm (utc) on Oct. 26, 2006]
javascript:void(prompt('test hi'));
Users are presented an information bar with an option to 'temporarily allow scripted windows for this site'. It is quite annoying that script execution proceeds while the user may be busy clicking and reading the information windows.
The default behavior can be changed in Tools > Internet Options > Security > enable 'allow websites to prompt for information using scripted windows'.