View Full Version : Newbie needs help on img slideshow urls

10-23-2009, 07:01 PM
Hi im currently using a script to slideshow images with hyperlink functions however, my urls open in the same page and I need help getting them to open in a new seperate or new window called from the dolink() function.

The script below is what im using, any help on this would be amazing as its driving me barmy.

//set image paths
src = ["images1.jpg", "images2.jpg"]

//set corresponding urls
url = ["http://www.url-images1", "http://www.url-images2"]

//set duration for each image
duration = 5;

ads=[]; ct=0;
function switchAd() {
var n=(ct+1)%src.length;
if (ads[n] && (ads[n].complete || ads[n].complete==null)) {
document["Ad_Image"].src = ads[ct=n].src;
ads[n=(ct+1)%src.length] = new Image;
ads[n].src = src[n];
function doLink(){
location.href = url[ct];
} onload = function(){
if (document.images)