Okay im designing a website. Fair enough.
In the pages im trying to have the corner images random (From a selection of a few). Whenever I vew this page I get the...
Quote:
To help protect your security, Internet Explorer has restrictedt his file from showing active content that could access your computer. Click here for options...
If you've got XP i'm guessing you know what ii'm talking about, its the annoying error thing or whatever that appears when it says its stopped a download that could *harm* my computer. Well anyway, its doing it on my website that i'm designing on my computer. The infinite stupidity of windows asssumes that a website i'm veiwing in my E:/ drive is trying to hack my computer. Dear god.
Anyway, I've got two questions, how can i stop that from popping up, and whats wrong with my java code thats making this happen? I got it from some free script site, but i've tried several now and each does the same thing. The code i'm using right now is...
Quote:
<script language="JavaScript">
<!--
// ==============================================
// Copyright 2003 by jsCode.com
// Source: jsCode.com
// Author: etLux
// Free for all; but please leave in the header.
// ==============================================
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array. Rememeber
// to increment the theImages[x] index!
theImages[0] = 'images/layout/rightimage.gif'
theImages[1] = 'images/layout/rightimage2.gif'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer[i] = new Image()
preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
//-->
</script>
Thats in the header, and this is where the image appears...
Quote:
<script language="JavaScript">
<!--
// ==============================================
// Copyright 2003 by jsCode.com
// Source: jsCode.com
// Author: etLux
// Free for all; but please leave in the header.
// ==============================================
showImage();
//-->
</script>
Tis being rather pooey eh! Can anyone give me any suggestions, or show us a code that doesn't create this problem? I dont want to just go ahead and fix it for myself, i'm now worried if anyone views the site they'll have the same problem. Not good!