Click to See Complete Forum and Search --> : help with cycling banners/links...


youarenowfrail
04-09-2003, 02:16 PM
i'm trying to have cycling banners/links on a page i'm working on. i was having a problem with getting the link to open in a new window. when i used a target in my link tag it was just bringing up a window with the url "javascript:newLocation". so i added a window.open to the function for the location. now it opens the link in a new window, but it still opens the link in the same frame as the banner, which i obviously don't want. if anyone can figure what i'm doing wrong it would be awesome...

the page can be found here...

www.bugempire.com/html/bottom.htm

JackTheTripper
04-09-2003, 02:21 PM
<a href="#" onClick="javascript:newLocation(); return false;">

youarenowfrail
04-09-2003, 03:55 PM
thanks, but that didn't work...

JackTheTripper
04-09-2003, 04:06 PM
<a href="#" onClick="javascript:newLocation(); return false;">

I don't think you need the javascript: part...


Try this...

<a href="#" onClick="newLocation(); return false;">

youarenowfrail
04-09-2003, 04:14 PM
still not working... is there anything i could add in the script that would change how it opens?

JackTheTripper
04-09-2003, 06:11 PM
OK, tested this time. Sorry.

change your newLocation function to this...


function newLocation() {
bannerWindow = window.open(href = "http://www." + adURL[thisAd])
}