-
Java script - I.E security problem?
Hi,
I'm quite new to Java script, and I'm not having any problems as such with coding.
But when I do try to run a simple script no matter how simple it is, I.E warns me about security settings and that fact that active content can be dangerous, asking me to manually choose whether to allow it to run or not.
Fair enough, I thought - my security settings need to be adjusted. But when looking through other sites' source and seeing that they use scripts all the time, the big question I have is why their scripts don't produce the same effect on my browser, and I cannot see any difference between their implementation and mine.
For example, take the following:
Put this in the head section:
<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{
// ** START **
if (form.name.value == "") {
alert( "Please enter name." );
form.name.focus();
return false ;
}
// ** END **
return true ;
}
//-->
</script>
Then in the body section the following:
<form action="process.php" method="post" onsubmit="return checkform(this);">
<input type="text" name="name" />
</form>
If I manually agree to running it, it works without a problem. So where am I going wrong here? Is there some piece of code I'm missing out? - why is it that others can successfully run scripts in their head section such as:
<script language=javascript type="text/javascript">
if (top.location!=self.location){top.location=self.location}
</script>
And yet this doesn't produce the same warning.
Thanks for your time and help, and my apologies if there is some really basic thing I'm missing here.
Cheers,
Will
-
If you run a HTML page locally from your harddrive and the content has any <script>, on.. behavior script, <object> within it, you will receive the warning for "Active Content."
Take the same page, and upload to your server = no warning.
This is a change to WindowsXP SP2's security model of file: protocol, and will not be seen from a http: page.
-
Thanks very much
Hi KC,
I just wanted to say thanks very much for taking the time out to explain this.
It's a huge help, and my heads slightly less sore, as I'm not banging my head off the desk so much.
Thanks,
Will
Similar Threads
-
By mcaashish in forum Java
Replies: 13
Last Post: 08-27-2012, 12:22 PM
-
Replies: 2
Last Post: 06-14-2006, 03:16 PM
-
Replies: 1
Last Post: 05-13-2005, 06:46 AM
-
Replies: 3
Last Post: 03-07-2005, 02:34 AM
-
By Jim Pragit in forum .NET
Replies: 64
Last Post: 10-20-2001, 08:06 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks