RegisterStartupScript & Window.Open

G

Guest

In my Page_Load I call a RegisterStartupScript. I know its getting called.
Yet, its not opening the page. I tried to open a regular .html file as well.
Same problem.
I know I can open 1. popup windows. I tested this with a whole different
application and it works fine. (different calling and receiving page though).
And the bummer is that it used to work last year when I last worked on this.
I'm sure of it. I even grabbed the same codebase to test with.
What am I missing?
I even saved the resultant page, and I can see my code in there.... (the new
code is at the very bottom.

Dim popupScript As String = "<script language='JavaScript'>" & _
"window.open('RtFileResult.aspx', '', " & _
"'width=750, height=580,
scrollbars,status,menubar,resizable,toolbar,titlebar,location');" & _
"</script>"

Page.RegisterStartupScript("PopupScript", popupScript)
 
B

Bruce Barker

the builtin popup blockers in browsers, detect this code, and prevent it
from running. if you need this code, you need to get your users to mark your
site as allowing popups.

-- bruce (sqlwork.com)
 
G

Guest

Any good ideas for workarounds using code? I get the feeling that
RegisterStartupScript should probably not be used for opening new windows?

I'm also trying to find a place here in IE that turns that on and off. Could
it instead be something within Windows itself (I just updated to XP-SP2 and
think that might have changed things)
 
B

Bruce Barker

XP-SP2 installed the feature in IE. you can turn off popup blocking for you
site. you should open the window from a client click event instead of
posting back.

-- bruce (sqlwork.com)
 
G

Guest

Yes. I understand. But in my case, I need the click event to first execute
code on the serverside. Then, depending upon the results, I either open a
brand new window, or refresh the current window with an error message. Is
there an easy way to do this?
Karen
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top