åbne link i nyt vindue
HejJeg vil gerne have linkene i denne her banner rotator, til at åbne i et nyt vindue....
Her er koden..
<script language='JavaScript'>
<!--
browserOk = false;
if ( (parseInt(navigator.appVersion)>=4 )
|| ( navigator.appName == "Netscape" ) ) {
browserOk = true;
} else {
alert("Sorry, Your browser do not support\n"
+"lightcc's banner rotator javascript");
};
// some browsers (like Internet Explorer 3)
// do not support imageswitching.
// setup banner rotator
//
var imgWidth = 740; // width of all the banners
var imgHeight = 60; // height of all the banners
var nrURLs;
banner1 = "banner_rotator/hgbanner_60.gif";
banner2 = "banner_rotator/HD-PARTS.gif";
banner3 = "banner_rotator/mcudstyr.gif";
banner4 = "banner_rotator/strip4u.gif";
banner5 = "banner_rotator/laven_banner2_60.gif";
bannerMax = 5; // increase this nr if you add more banners
nrURLs = bannerMax
page1 = "annoncér.asp";
page2 = "http://www.hd-parts.dk/";
page3 = "http://www.leomortensen.dk/";
page4 = "http://www.strip4you.dk/";
page5 = "http://www.laven-motorservice.dk//";
pageMax = 5; // increase this nr if you add more banners
if ( pageMax != nrURLs ) {
if ( nrURLs > pageMax ) nrURLs = pageMax;
alert("Javascript coding error !\n"
+"You must have the same number of\n"
+"of bannerURLs and pageURLs\n \n"
+"Only the " +nrURLs +" first images will be shown.");
};
shownURL = 2; // # banner currently shown
nextURL = 2; // # of next banner to be shown
nextPic = 0; // image object will go here
picID = 0; // local timekeeping variable
banFocus = false;
function getNextURL() {
nextURL = Math.round( (Math.random()*nrURLs) +0.5 );
nextPic = new Image (imgWidth,imgHeight);
nextPic.src = eval("banner"+nextURL);
};
if ( browserOk ) { getNextURL(); };
function getNextPic() {
if ( browserOk ) {
if ( nextPic.complete == true ) {
//alert ( nextPic.src );
document.images.pic1.src = nextPic.src;
shownURL = nextURL;
getNextURL();
picID = setTimeout('getNextPic()',8000);
if ( banFocus ) showURL(true);
} else {
//alert ( "waiting for "+nextURL );
picID = setTimeout('getNextPic()',1000);
};
};
};
function goThere() {
top.location = eval("page"+shownURL);
};
function showURL(bool) {
banFocus = bool;
if ( bool == true ) {
top.self.status = eval("page"+shownURL);
} else {
top.self.status = "";
};
};
// -->
</script>
Jeg har prøvet at udskifte "top.self.status" med "top.blank.status" og "top.location" med blank.location" men du virker ikke....