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