1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Test Country to goto URL

Discussion in 'C#' started by Cambassador, Jan 20, 2012.

  1. #1
    This is so simple but I keep getting a 500

    <% If Session("CountryCode") = "US" Then %>
    <script type="text/javascript" language="javascript">
    // directly jump page
    window.location.href = 'http://www.icbla.org/Crisis/US/Request.asp';
    // definite time to jump page
    setTimeout("javascript:location.href='http://www.icbla.org/Crisis/US/Request.asp'", 5000);
    </script>
    <% End If %>

    Anyone have an idea why it is not working????
     
    Last edited: Jan 20, 2012
    Cambassador, Jan 20, 2012 IP
  2. ivickon

    ivickon Peon

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The function makes sure the redirected URL is formatted correctly. Open URL (for remote testing). ... including your email address, country, zip code, and phone number.
     
    ivickon, Feb 1, 2012 IP
  3. jhannell

    jhannell Member

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Hi, why are you trying to do it with javascript? you can use a simple asp code to redirect the person to that page. use response.redirect..

    <% If Session("CountryCode") = "US" Then response.redirect("http://www.icbla.org/Crisis/US/Request.asp") %>

    Only one line code. No need for "end if"...
     
    jhannell, Feb 16, 2012 IP
  4. rkstech

    rkstech Active Member

    Messages:
    195
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    73
    #4
    agreed with jhannell

    response.redirect is simple
     
    rkstech, Mar 7, 2012 IP