problem with javascript

Discussion in 'Software' started by dootam, Jul 10, 2007.

  1. dootam

    dootam

    Joined:
    Jul 10, 2007
    Messages:
    2
    I am using ASP.NET 2.0, C# and javascript to open a new browser window and encounter the following problem:

    On Page1.aspx I have a button with the following click event:

    Response.Write("<script>window.open('Page2.aspx','_new');</script>");

    This works as expected.

    On Page2.aspx I have again a button with the following click event:

    Response.Write("<script>window.open('Page3.aspx','_new');</script>");

    This is my problem; Page3.aspx does not open in a new window, instead it opens in the same window. I want a new window and when a user finishes with Page3, the new window closes and the user is back in Page2.aspx.

    Thank you in advance for your help.
    dootam, Jul 10, 2007
    #1
    1. Advertising

  2. dootam

    dootam

    Joined:
    Jul 10, 2007
    Messages:
    2
    Problem solved by replacing '_new' with '_blank'.
    Thanks for the help from
    Phil Weber
    Microsoft MVP
    http://www.philweber.com
    dootam, Jul 10, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Iain Challis

    Javascript problem

    Iain Challis, Feb 14, 2004, in forum: Computer Support
    Replies:
    2
    Views:
    398
  2. Mike Walker

    Javascript code problem

    Mike Walker, May 31, 2005, in forum: Computer Support
    Replies:
    6
    Views:
    468
  3. oedin

    javascript problem .....

    oedin, Aug 15, 2006, in forum: Firefox
    Replies:
    0
    Views:
    470
    oedin
    Aug 15, 2006
  4. Muse Groops

    Youtube not working, Javascript problem?

    Muse Groops, Mar 27, 2007, in forum: Computer Support
    Replies:
    8
    Views:
    7,197
    MarkSatterfield
    Oct 30, 2008
  5. Shane

    To Javascript, or not to Javascript

    Shane, Aug 29, 2005, in forum: NZ Computing
    Replies:
    5
    Views:
    431
    Waylon Kenning
    Aug 30, 2005
Loading...

Share This Page