SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot litmania_com's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How do I ammend the following banner rotation code so that the links open in a new window please? Thank you very much

    <SCRIPT language=JAVASCRIPT type=TEXT/JAVASCRIPT>
    <!-- Hide script from old browsers

    adImages = new Array("http://www.qksrv.net/image-734283-1205205","/bla/ban/blabanukalig.gif","/whs/cdp/ban/cdpbanlikemusic.gif")
    adURL = new Array("http://www.qksrv.net/click-734283-1205205","http://www.UKHotMovies.com/shopping","http://WHSmithMusic.cjb.net")
    thisAd = 0
    imgCt = adImages.length

    function rotate() {
    if (document.images) {
    if (document.adBanner.complete) {
    thisAd++
    if (thisAd == imgCt) {
    thisAd = 0
    }
    document.adBanner.src=adImages[thisAd]
    }
    setTimeout("rotate()", 17 * 1000)
    }
    }

    function newLocation() {
    document.location.href = "" + adURL[thisAd]
    }

    // End hiding script from old browsers -->
    </SCRIPT>

    <A href="javascript:newLocation()"><IMG

    src="/bla/ban/blabanukwholepic.jpg"
    name=adBanner></A></div>
    Nadeem Azam
    Litmania.com Inc.

    Free promotion - check out this 1:1 banner exchange
    Dot com domains - the world's most prestigious domain names for sale

  2. #2
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <A href="java script:newLocation()" target = "_new"><IMG 
    
    src="/bla/ban/blabanukwholepic.jpg" 
    name=adBanner></A></div>
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  3. #3
    SitePoint Zealot litmania_com's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the reply but I'm afraid it doesn't work. I'd tried doing that before, but it just pops-up a window which has "javascript:newLocation()" in the address bar.

    Anyway, I've found another solution, even though it's quite complex.

    For anybody who wants to know how it's been resolved, see the source code here:
    http://www.UKHotMovies.com/links

    Feel free to nick the code if you need to
    Nadeem Azam
    Litmania.com Inc.

    Free promotion - check out this 1:1 banner exchange
    Dot com domains - the world's most prestigious domain names for sale


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •