window.open problem

R

Rbrt

I must be missing something simple, but can't figure this out. I want to
popup an error notification page (showerror.aspx) if any errors occur while a
page is being processed.

I should be able to do this by putting the following code in the
LoadComplete event ...

if errsfound then

Response.Write("<script>var newwin = window.open ('ErrorPage.aspx',
'newwindow');return false;</script>")

end if

However, this code does not pop up the new window. If I take the 'return
false' out, it pops up the window but the current page refreshes, which
causes the window to popup again, and the whole thing goes into a loop.

I have tried a number of variations of this code with no success. I am using
ASP.NET 2.0 with Visual Studio 2005 (vb)

What am I missing?

Thanks in advance

Robert

Robert
 
R

Rbrt

Thanks Mark. Works great for using the alert function. I substituted the
"alert('Hello World!')" with "window.open('ErrorPage.aspx');return false;",
but still can't get a window to open with the page I want. As soon as I put
in a "return false" the window.open stops working.

I would much rather be able to open a window with a page of information than
just use the simple alert function.

Any ideas?
 
S

Scott M.

Uh, how about taking out "return false" then?



Rbrt said:
Thanks Mark. Works great for using the alert function. I substituted the
"alert('Hello World!')" with "window.open('ErrorPage.aspx');return
false;",
but still can't get a window to open with the page I want. As soon as I
put
in a "return false" the window.open stops working.

I would much rather be able to open a window with a page of information
than
just use the simple alert function.

Any ideas?
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top