|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi, i have a banner rotator code that will bring the user to diffrent url.
however, i wish to allow the user to click from the banner ads (cocola) to load into a different window and the banner ads for mbf load back to itself. how can i do this from the code? below is my code. <HTML> <HEAD> <TITLE>Banner Rotator</TITLE> <script language="javascript"> <!-- function loadpage() { index1 = 0; listofimages = new Array(2); listofimages[0] = new Image(280,60) listofimages[0].src = "images/cokeban.gif" listofimages[1] = new Image(280,60) listofimages[1].src = "images/mbfban.gif" thetimer = setTimeout("changeimage()", 2000); } function changeimage(){ index1 = index1 + 1 if (index1 == "2") { index1 = 0 } imagesource = listofimages[index1].src window.document.banner1.src = imagesource thetimer = setTimeout("changeimage()", 1500); } function changepage() { if (index1 == 0) { target ="http://www.cocacola.com" } else if (index1 == 1) { target = "http://www.mastercard.com" } location = target } // --> </script> </HEAD> <BODY onload="loadpage()" link=black vlink=black alink=black> <BR><BR><BR> <CENTER> <A HREF="javascript:changepage()"><img src="images/cokeban.gif" alt="Rotating Banner" border=3" name="banner1" WIDTH="280" HEIGHT="60"></A> </CENTER> </BODY> </HTML> thank you. jenice |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > open new window from Frame! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|