Safari problem with a Javascript

Posted:
in Genius Bar edited January 2014
I am using this Javascript code below, so that when people enter my web site, the splash picture is different or the images change when they click reload.

Code:


<SCRIPT LANGUAGE="Javascript"><!--_

__ function image() { };_

__ image = new image();

__ number = 0;_

__ image[number++] = "<img src='http://www.****.com/splash.gif' border='0'>"

__ image[number++] = "<img src='http://www.****.com/splash2.gif' border='0'>"

__ image[number++] = "<img src='http://www.****.com/splash3.gif' border='0'>"

__ image[number++] = "<img src='http://www.****.com/splash4.gif' border='0'>"

__ image[number++] = "<img src='http://www.****.com/splash5.gif' border='0'>"_

__ image[number++] = "<img src='http://www.****.com/splash6.gif' border='0'>"_

__ image[number++] = "<img src='http://www.****.com/splash7.gif' border='0'>"

__ image[number++] = "<img src='http://www.****.com/splash8.gif' border='0'>"_

__ increment = Math.floor(Math.random() * number);_ document.write(image[increment]);_

__ </SCRIPT>





But the problem is with Safari/IE, when I upload the page, Safari will show everything else on the page but, this code and the resulting image. I get no error messages from Safari. The same problem occurs in Mac IE, but not on Mac Netscape. Contrary, the code works fine in IE and Mozilla on Windows XP. All of this is done in Dreamweaver MX. Any thoughts on why this isn't working in Safari? I would really like to get it up and running correctly on Safari. Sorry, but I can't give out the web site address, because it would reveal my full name. Thanks all, this is driving me nuts, let me know if you want the complete page code!

Comments

Sign In or Register to comment.