vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How can I make the banner links pop in a new window? (https://vborg.vbsupport.ru/showthread.php?t=135310)

bradg 01-02-2007 12:37 PM

How can I make the banner links pop in a new window?
 
This is the banner code below that I use works great, but they dont pop up in a new window. I think I can place a target_blank in somewhere, and maybe I dont?

<!-- Goose Hunting banners Below-->

<div style="width:30%; margin:0 auto">
<if condition="$forumid == 54">
<script language="JavaScript">
<!--
function adArray() {
for (i=0; i*2<adArray.arguments.length; i++) {
this[i] = new Object();
this[i].src = adArray.arguments[i*2];
this[i].href = adArray.arguments[i*2+1];
}
this.length = i;
}
function getAdNum() {
dat = new Date();
dat = (dat.getTime()+"").charAt(8);
if (dat.length == 1)
ad_num = dat%ads.length;
else
ad_num = 0;
return ad_num;
}

var ads = new adArray(
"images/banners/LewisOutdoorAdvturesbanner.gif","http://www.lewisoutdooradventures.com",
"images/banners/flocknocker.gif","http://www.flocknockers.com",
"images/banners/ColumbiaBasinWatfowlBannernew.jpg","http://www.basinwaterfowl.com",
"images/banners/StormOutfittersbanner.jpg","http://www.stormoutfitters.com");

var ad_num = getAdNum(); // don't change this line

document.write(''
+'<A HREF="'+ads[ad_num].href+'"><IMG SRC="'+ads[ad_num].src+'" '
+'BORDER=0 name=js_ad>');

// ****** YOU NEED NOT MODIFY ANYTHING THAT IS NOT IN BETWEEN THESE TWO COMMENTS ****

link_num = document.links.length-1;

function rotateSponsor() {
if (document.images) {
ad_num = (ad_num+1)%ads.length;
document.js_ad.src = ads[ad_num].src;
document.links[link_num].href = ads[ad_num].href;
setTimeout("rotateSponsor()",45000);
}
}
setTimeout("rotateSponsor()",45000);

// -->
</script>
</if>
</div>


All times are GMT. The time now is 07:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01003 seconds
  • Memory Usage 1,706KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete