Results 1 to 10 of 10
  1. #1
    New Lounger
    Join Date
    Jun 2003
    Location
    Kearney, Nebraska, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pass url to open a window then refresh to a new pa

    I'm looking for any help on passing a URL parameter to open a page then have that page refresh with the new passed URL.

    The way this would be used is on a links page:

    For instance, there is a link to CNN.com with the url www.cnn.com.
    When you click on that link I would like it to open a new window saying something like, "X Company does not endorse, approve, certify, or control this external site and does not guarantee the accuracy, completeness, efficiency, timeliness, or accurate sequencing of the information contained therein. You will automatically be redirected to your destination within 10 seconds. If you are not redirected, please click here."

    After about 10 seconds I would like it to refresh to the passed URL. I would also like the "please click here" link on that page to be active with the correct URL that was passed.

    Any help would be grealy appreciated!
    Thanks in advance!

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a new pa

    Would something like this from the JavaScript Source do?

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newark, New Jersey, USA
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a ne

    Yes, this on your links page:

    www.cnn.com

    then on the cnn.html like this:

    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="15;URL=http://cnn.com/">
    <TITLE>wopr.com</TITLE>
    </HEAD><BODY>
    Blah blah blah blah
    </HTML>
    THat will show this page for 15 seconds and then go to cnn.com

    Is this what you wanted?
    Mike Wolfman
    Jack of all, Master of none
    Bow before me, for I am root.
    <IMG SRC=http://www.wopr.com/w3tfiles/112673-wolfsig.jpg>

  4. #4
    New Lounger
    Join Date
    Jun 2003
    Location
    Kearney, Nebraska, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a ne

    Thanks for the input guys but as far as I can tell I'd still be required to create a separate file for every link. Ideally I would like some kind of ONCLICK function that would pass a URL to a single page. Something like:

    onClick=RedirectLink(http://www.cnn.com);>

    That would open a page in a new window that would dynamically forward me to the correct link based on a URL passed as a paramater.

    Does this make any sense or I am high on crack?

    Please help,
    freemans

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newark, New Jersey, USA
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a ne

    Yes, same as target="_blank" but you need to redirect after the page thats says blah blah blah. The only way I can think to do that is to make seperate files for each link.

    http://www.thewolfmans.com/freemans
    Mike Wolfman
    Jack of all, Master of none
    Bow before me, for I am root.
    <IMG SRC=http://www.wopr.com/w3tfiles/112673-wolfsig.jpg>

  6. #6
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a ne

    Would opening the new window in a framed page do? - similar to the following which opens an MSKB article with a Woody's Watch header. You could add your own consistent disclaimer as the header frame and a single varying referred-to-page as the "main" frame.

    <!mskb=815411>Microsoft Knowledge Base Article 815411<!/mskb>

  7. #7
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newark, New Jersey, USA
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a ne

    Kinda like this:

    http://www.thewolfmans.com/freemans
    Click on the frames cnn.

    But you still need another file.
    Mike Wolfman
    Jack of all, Master of none
    Bow before me, for I am root.
    <IMG SRC=http://www.wopr.com/w3tfiles/112673-wolfsig.jpg>

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Pass url to open a window then refresh to a new pa

    See this thread and the thread to which it refers. Between them, you should be able to code this up with JavaScript, no sweat. With ASP or Perl or PHP, it's probably easier.

  9. #9
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a new pa

    Create the Following asp page:
    <%
    Dim strURL
    strURL=Request.QueryString("RedirectURL")
    % >
    < HTML >
    < HEAD >
    < META HTTP-EQUIV="refresh" CONTENT="10; URL=< %=strURL% >" >
    < /HEAD >
    < BODY >
    < a href="< %=strURL% >">If you are not redirected, please click here.< /a >
    < /Body >
    < /HTML >

    Then, simply create your links with the RedirectURL QueryString, like this:
    < a href="myredirectpage.asp?RedirectURL=www.msn.com"> MSN.com< /a >

    Had to put spaces after the < and before the > to display here. (Just an FYI)

  10. #10
    4 Star Lounger
    Join Date
    Aug 2002
    Location
    Dallas, Texas, USA
    Posts
    594
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pass url to open a window then refresh to a new pa

    Ooops, just a quick addendum, you'll want to use target="_blank" in those links, but that was already mentioned.

Posting Permissions

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