Redirect to New Browser Window like Response.Redirect

Ask a Question related to ASP, Design and Development.

  1. #1

    Default Re: Redirect to New Browser Window like Response.Redirect

    That worked just fine for me as long as you put that open statement on one
    line rather than 2.



    "michel" <michely3k@yahoo.com> wrote in message
    news:78a6bbc.0306301413.4a5706e1@posting.google.co m...
    > Greetings,
    >
    > I need to launch a new browser window in an IF, THEN statement. I
    > originally had a Response.Redirect but I now need a new window. I
    > have tried the following code and it is not working. Does anyone know
    > any other way of accomplishing this?
    >
    > Response.Buffer = True [at top of page]
    >
    > [THEN portion of IF statement]
    >
    > Response.Write ("<Script Language='JavaScript'>")
    > Response.Write ("window.open
    >
    ('http://www.cnn.com','cnn','height=400,width=400,toolbar=n o,scrollbars=yes,
    resizable=no,menubar=no')")
    > Response.Write ("</Script>")
    > Response.Flush
    >
    > [End of IF THEN statement]
    >
    >
    > Thanks,
    > Oscar

    Guest

  2. Similar Questions and Discussions

    1. Response.Redirect from within a user control affects browser histo
      I have an ASP .NET user control containing a data grid. The data grid has a column containing hyperlinks that redirect the user to the view page...
    2. response.redirect
      I use Respose.Redirect quite a bit but on one of my pages it has an odd behavior. Any time I use it on this page it will come up in a new Window. I...
    3. asp response.redirect
      > FORM ACTION="Goto_yahoo" must be Goto_yahoo.asp
    4. response.redirect?
      Is it possible to set a interval for response.redirect? SOmething you see on different forums. I've written a page where the people can change there...
    5. Response.Redirect to a new browser window?
      Can I do some kind of response.redirect to a new browser window? I need to use session variables in the new window and process some things on...
  3. #2

    Default Re: Redirect to New Browser Window like Response.Redirect

    What do you mean "it's not working"?

    a) Is the javascript being written to the browser? (you can check using
    view-source)
    b) If so, then is the javascript valid? (the browser will tell you if there
    is an error - IE has a little icon in the bottom left corner with an
    exclamation mark. In Netscape/Moz you type javascript: into the address bar
    to bring up the javascript console)

    This "new window" thing isn't ASP per se. You are writing out client-side
    code that will be processed by the browser. So you need to focus your
    debugging efforts there.

    Also, you should probably replace:
    <script language='javascript'>
    with
    <script type='text/javascript'>
    as the former is not HTML v4 compliant IIRC

    Cheers
    Ken


    "michel" <michely3k@yahoo.com> wrote in message
    news:78a6bbc.0306301413.4a5706e1@posting.google.co m...
    : Greetings,
    :
    : I need to launch a new browser window in an IF, THEN statement. I
    : originally had a Response.Redirect but I now need a new window. I
    : have tried the following code and it is not working. Does anyone know
    : any other way of accomplishing this?
    :
    : Response.Buffer = True [at top of page]
    :
    : [THEN portion of IF statement]
    :
    : Response.Write ("<Script Language='JavaScript'>")
    : Response.Write ("window.open
    :
    ('http://www.cnn.com','cnn','height=400,width=400,toolbar=n o,scrollbars=yes,
    resizable=no,menubar=no')")
    : Response.Write ("</Script>")
    : Response.Flush
    :
    : [End of IF THEN statement]
    :
    :
    : Thanks,
    : Oscar


    Ken Schaefer Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139