/    Sign up×
Community /Pin to ProfileBookmark

Quick Question about rollover url capability

I have the following contained within a script that is working great:

[CODE]images=[

[“images/pic03.jpg”,”page3.htm”],
[“images/pic04.jpg”,”page4.htm”],
[“images/pic02.jpg”,”page1.htm”],
[“images/pic02.jpg”,”page2.htm”]

][/CODE]

currently the pages that load when I click the correct revolving image loads in a small square, clips 80% of the page and doesn’t even let me scroll…..ideal if I were clicking on a small graphic and wanting to “blow it up larger”

However I would like to use this as an alternative way to navigate a featured gallery…like “wow that’s a nice picture, I’ll click this to so to whatever .htm page has this picture in it….etc..)

[B]so I just need to know how to add “target=_blank” and possibly other settings to the above code…[/B]

Do you need more of the code to answer this? Let me know please and thanks in advance!!

  • Brett
  • to post a comment
    JavaScript

    2 Comments(s)

    Copy linkTweet thisAlerts:
    @Arty_EffemAug 01.2007 — 

    [CODE]images=[


    ["images/pic03.jpg","page3.htm"],
    ["images/pic04.jpg","page4.htm"],
    ["images/pic02.jpg","page1.htm"],
    ["images/pic02.jpg","page2.htm"]

    ][/CODE]

    .

    [B]so I just need to know how to add "target=_blank" and possibly other settings to the above code...[/B]

    thanks in advance!!
    [/QUOTE]
    You can't do just that; the rest of the code that you haven't shown would need modification.

    You're welcome in advance.
    Copy linkTweet thisAlerts:
    @brett007authorAug 01.2007 — You can't do just that; the rest of the code that you haven't shown would need modification.

    You're welcome in advance.[/QUOTE]


    Ahhh I was worried about that...just for clarification, I'm just trying to get the new page that is sourced from the script (clicked image) to load into a new regular window...currently it just loads into a small window that you cannot adjust... (the new pages would no longer have the script in it, etc...)

    Here is free script I'm utilizing, please let me know if it's possible...thanks again!


    [CODE]<script type="text/javascript">
    <!--
    // Jeff
    //www.huntingground.freeserve.co.uk

    images=[


    ["images/pic03.jpg","page3.htm"],
    ["images/pic04.jpg","page4.htm"],
    ["images/pic02.jpg","page1.html"],
    ["images/pic02.jpg","page2.htm"]

    ]

    pause = 2 // seconds
    fadeSpeed = 4

    opac1=100
    opac2=0
    nextPic=0
    nextLink=0
    running=0

    function initISF2(){
    elOpic1=document.getElementById("opic1")
    elOpic2=document.getElementById("opic2")
    lnkLoc=images[nextLink][1]
    document.getElementById("mylink").onclick=function(){isf2Link()}
    document.getElementById("mylink").style.cursor="pointer"

    setTimeout("fadeISF2()",pause*1000)
    }

    function fadeISF2(){
    running=1

    opac1 -= fadeSpeed
    opac2 += fadeSpeed

    if("filters" in document.body && "alpha" in document.body.filters){
    elOpic1.filters.alpha.opacity=opac1
    elOpic2.filters.alpha.opacity=opac2
    }
    else{
    elOpic1.style.opacity=(opac1/100)-0.001
    elOpic2.style.opacity=(opac2/100)-0.001
    }

    if(opac1<=0||opac2<=0){

    if(opac1<=0){elOpic1.src=images[nextPic][0]}
    else{elOpic2.src=images[nextPic][0]}

    nextPic++
    if(nextPic==images.length){nextPic=0}

    nextLink++
    if(nextLink==images.length){nextLink=0}

    fadeSpeed= -fadeSpeed

    running=0
    }

    if(opac1>=100||opac2>=100){
    lnkLoc=images[nextLink][1]
    }

    if(running==0){
    setTimeout("fadeISF2()",pause*1000)
    }
    else{
    setTimeout("fadeISF2()",50)
    }

    }

    function isf2Link(){
    if(running==1){return}
    if(images[nextLink][1]){
    //location=lnkLoc
    newWin=window.open(lnkLoc,'lnk_win','left=200,top=200,width=450,height=350')
    newWin.focus()
    }
    }

    // add onload="initISF2()" to the opening BODY tag

    //-->
    </script>[/CODE]
    ×

    Success!

    Help @brett007 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.2,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,
    )...