hey guys...i'm completely stumped. i've done this before and was successful but for some reason this is not happening. i THINK i may know why but was hoping someone could shed some light on this... http://www.studio9designs.org/brian/duratuff/index.html i'm trying to make the main big image rotate as i have 7 main pics. i've placed javascript below the </head> and above the <body> and the image reference code next to the main 1st image called mainpic1.jpg. here's how i have it... </head> <SCRIPT LANGUAGE="JavaScript"> <!-- // The Array Function function makeArray(len) { for (var i = 0; i < len; i++) this = null; this.length = len; } // This is where the array of text/images/sounds is created. images = new makeArray(4); images[0] = "<img src='http://studio9designs.org/brian/duratuff/mainpic1.jpg' border='0'>"; images[1] = "<img src='http://studio9designs.org/brian/duratuff/mainpic2.jpg' border='0'>"; images[2] = "<img src='http://studio9designs.org/brian/duratuff/mainpic3.jpg' border='0'>"; images[3] = "<img src='http://studio9designs.org/brian/duratuff/mainpic4.jpg' border='0'>"; // The random number generator. function rand(n) { seed = (0x015a4e35 * seed) % 0x7fffffff; return (seed >> 16) % n; } // --> </SCRIPT> <body bgcolor="FFFFFF" marginheight="0" marginwidth="0" leftmargin="0" rightmargin="0" bottommargin="0"> ...and the right by the image i have... <td colspan="3"> <SCRIPT LANGUAGE="JavaScript"> <!-- bName = navigator.appName;bVer = parseInt(navigator.appVersion); if ((bName == "Netscape" && bVer >= 3) || (bName == "Microsoft Internet Explorer" && bVer >= 3)) br = "n3"; else br = "n2"; // Where you place this is where the random object will be displayed. if (br == "n3") { document.write(images[rand(images.length)]) } else { document.write("<img src='http://studio9designs.org/brian/duratuff/mainpic1.jpg' border='0'>"); } // --> </SCRIPT><img src="http://studio9designs.org/brian/duratuff/mainpic1.jpg" width="557" height="240"> </td></tr> where am i going wrong here? i'm thinking ... is it because of adsense/google ads that the page is NOT refreshing?? thanks - drew
Do you want the images to rotate randomly or would you like to have some that rotate more than others? Also do you want them to rotate when the page reloads?
thanks guys...initially that was my first mistake but all i was missing was the rollover code in the 'body' tag...lol that's all i was missing but thanks guys..i got it up