Click to See Complete Forum and Search --> : banners not opening in their own window.


gokou
03-12-2003, 02:37 PM
Heres the site. uogameresources (http://www.uogameresources.com)

heres the code

<td align="center" bgcolor="#606060"><script language="javascript">
banners=new Array()
banners[0]="<img border=0 src=images/banner.gif>"
banners[1]="<img border=0 src=images/uosalesbanner.gif>"
banners[2]="<img border=0 src=images/hekirubanner3.jpg>"

goto=new Array()
goto[0]=""
goto[1]="http://www32.brinkster.com/uosales"
goto[2]="http://www.hekiruworld.com"

var number=Math.round(2 * Math.random());

var link=goto[number]
var image=banners[number]
document.write("<a href="+link+ ">" +image+ "</a>")
</script></td>

I the banners pages opens up inside the frame and I don't want it to do that. I don't know how to add target="_top" in the javascript script. Also if theres a way to make those banners show up in netscape, it would be nice to know.

Jona
03-12-2003, 04:23 PM
To open it in a new window? Or get rid of the frames? Well, you can change this line:

document.write("<a href="+link+ ">" +image+ "</a>")

to

document.write("<a href="+link+ " target='_blank'>" +image+ "</a>")

That will open it in a new window. You can try _top if you'd like, as well, but I think that's going to just get rid of the frames and leave your site behind while the visitor moves on to the other site. Of course, it's your choice for whatever you want.....

gokou
03-12-2003, 04:40 PM
Thank you. _blank is what I wanted.