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 5 of 5

Thread: double link

  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool double link

    Hello Could Some one help me with a jscript im making a downloads page and i need a jscrpit that shows a link and when the link is clicked it will direct them to the url of my download and a then loads a new page that says somthing like thanks for downloading so it would like load the download link first that would bring up thge what do you want to do open save or cancil and then it would take them to another page

  • #2
    New Coder
    Join Date
    Dec 2004
    Location
    Portsmouth, UK
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This might not be a complete answer, but it may be an angle worth trying:

    The link in the body:
    Code:
    <a href="one_page.htm" onclick="open_win('popup_page.htm')"><img src="link.gif" name="s3" id="s3"></a>
    ...and in the head:
    Code:
    <script><!--
    function open_win(pagename)
    {
    window.open(pagename,"new_page","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=yes, width=400, height=400")
    }
    //--></script>
    I got this stuff from the W3Schools website - you could try these links for a breakdown of what all the bits do:
    http://www.w3schools.com/htmldom/dom_obj_window.asp
    http://www.w3schools.com/js/tryit.as..._openallwindow

    I added the "pagename" variable so I could reuse the code to open different windows, and surprised myself when it actually worked...

  • #3
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok so that would open 2 windows with one link because i have a download page that i need it to start the download and then redirect the user to a different page or would it open the download link and then the other page???

  • #4
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    never mind i got it to work thankyou
    the only problem is how would i close the blank window that stays popuped up after the download popupsup
    Last edited by codyhtml; 02-02-2005 at 05:46 AM. Reason: so as not to post again

  • #5
    New Coder
    Join Date
    Dec 2004
    Location
    Portsmouth, UK
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'll bet someone here smarter than me could tell you how to do this - but personally I'd just live with it!

    Joe.


  •  

    Posting Permissions

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