Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to alter this code to make popup open *another* popup onClick?

    Hi -
    I know very little about JavaScript and I'm trying to finish a website...

    I hope someone knows how to do this because I'm going bonkers!!!

    This script works just fine to make a larger version of a clicked thumbnail pic (in a Flash movie) pop up:

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function pop1(){
    window.open("Images/Associates/1.jpg","","height=450,width=302,left=100,top=100,scrollbars=0,resizable=0");
    }
    //-->
    </script>

    What I want is, when the larger version pops up, the visitor can click on the picture (or a link that appears in the picture) and go to their website. (I know this must be possible because I see it everywhere in those annoying popup ads... )
    I've tried all sorts of things, and all I get are error messages... argh.
    Thanks in advance... Marianne

  • #2
    New Coder
    Join Date
    Aug 2002
    Location
    Californication
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey mjstone323,

    I'm just starting out too, so this might be like the blind leading the blind.

    Static images don't have inherent hyperlinks so I think what you'll need to do is create an HTML page with only 1.jpg within the <body> tags.

    You'll also need to rewrite your JS to open up the HTML page in the popup window.

    Hope that made sense ...

    Code:
    <SCRIPT LANGUAGE="JavaScript"> 
    <!-- 
    function pop1(){ 
    window.open("Images/Associates/1.html",""," height=450,width=302,left=100,top=100,scrollbars=0
    ,resizable=0"); 
    } 
    //--> 
    </script>
    It's quoted in the Bible, Revelations ... Behold the pale horse. The man who sat on him was death, and Hell followed with him.

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks jujubees - I actually had that thought but was hoping I didn't have to do that.... There are fifteen images -

    But guess what?!?! I've probably spent more time trying to figure out how to alter the JavaScript than it's going to take me to create 15 little HTML docs... argh.

    If anyone else has any ideas, keep 'em comin'....

  • #4
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi again -
    Just tried your suggestion, jujubees - works EXACTLY the way I want it to. You rock.


  •  

    Posting Permissions

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