How to determine if browser window already open

M

MikeTI

Sep 5, 2009

Hi all

I am new to ASP Net and am using VS2008.

On the click of a button in a form I want to:
1. Check if the second form is already on the browser, to ensure that
another instance of the form does not display.
2. Set focus to the second form without the second form doing any postback.

I have seen some codes in the internet, but the second form does a postback.

function ShowOrderForm()
{
/* If the window doesn't exist or has been closed, open it */
if((typeof newwindow == 'undefined') ||!(newwindow.open) ||
newwindow.closed)
{
newwindow=window.open("Test05.aspx", "my_order");
}

if (window.focus) {newwindow.focus()}
}

Thank you in advance.
MikeTI
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top