Quote:
Originally Posted by GrandAmGuru
I'm using the following version of the code
PHP Code:
<script language="Javascript"><!-- function image() { }; image = new image(); number = 0; // imageArray image[number++] = "<a href='http://www.domain.net'><img src='http://www.domain.net/picture1.gif' border='0'></a>" image[number++] = "<a href='http://www.domain.net'><img src='http://www.domain.net/picture2.gif' border='0'></a>" image[number++] = "<a href='http://www.domain.net'><img src='http://www.domain.net/picture3.jpg' border='0'></a>" image[number++] = "<a href='http://www.domain.net'><img src='http://www.domain.net/picture4.gif' border='0'></a>" image[number++] = "<a href='http://www.domain.net'><img src='http://www.domain.net/picture4.jpg' border='0'></a>" // Carry on adding images - as many as you want increment = Math.floor(Math.random() * number); document.write(image[increment]); //--> </script>
and I can't for the life of me get the right code to center the image. I've tried all sorts of things in the document.write(image[increment]); line. Help!
nevermind. found it.
document.write("<center>",image[increment]);
|
It looks like your using the code form this hack,
https://vborg.vbsupport.ru/showthread.php?t=106682
Have you tried putting a <center> in front and a <center> at the end of the script?