problem with javascript

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

  1. dootam

    dootam

    Joined:
    Jul 10, 2007
    Messages:
    2
    Likes Received:
    0
    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. Advertisements

  2. dootam

    dootam

    Joined:
    Jul 10, 2007
    Messages:
    2
    Likes Received:
    0
    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. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.