I am having the following HTML file protected through JavaScript.
It works fine with Firefox, howover, when it is opened with IE, the JavaScript seems not get invoked. The grading.pdf is directly displayed after clicking the hyperlink.
<HTML>
<HEAD>
<TITLE>JavaScript Example 8</TITLE>
<SCRIPT language="JavaScript">
<!--------
var password;
var pass1="test";
password=prompt('Please enter your password to view this page!',' ');
if (password==pass1)
alert('Password Correct! Click OK to enter!');
else
{
window.location="jpass.htm";
}
//----------->
</SCRIPT>
</HEAD>
<BODY bgcolor="#FFFFFF" text="#000000">
<!--<H1 align="center"><a href="grades.pdf">grading</a></H1>-->
<CENTER>
<!--<A HREF="grades.htm">Grading</A>-->
<a href="grades.pdf">grading</a>