473,383 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

RegisterStartupScript & Window.Open

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,titleb ar,location');" & _
"</script>"

Page.RegisterStartupScript("PopupScript", popupScript)

Nov 19 '05 #1
4 3265
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)


"klynn" <kl***@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
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,titleb ar,location');" & _
"</script>"

Page.RegisterStartupScript("PopupScript", popupScript)

Nov 19 '05 #2
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)

"Bruce Barker" wrote:
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)


"klynn" <kl***@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
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,titleb ar,location');" & _
"</script>"

Page.RegisterStartupScript("PopupScript", popupScript)


Nov 19 '05 #3
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)

"klynn" <kl***@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
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)

"Bruce Barker" wrote:
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)


"klynn" <kl***@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
> 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,titleb ar,location');" & _
> "</script>"
>
> Page.RegisterStartupScript("PopupScript", popupScript)
>


Nov 19 '05 #4
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

"Bruce Barker" wrote:
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)

"klynn" <kl***@discussions.microsoft.com> wrote in message
news:02**********************************@microsof t.com...
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)

"Bruce Barker" wrote:
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)


"klynn" <kl***@discussions.microsoft.com> wrote in message
news:F3**********************************@microsof t.com...
> 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,titleb ar,location');" & _
> "</script>"
>
> Page.RegisterStartupScript("PopupScript", popupScript)
>


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Bill Jones | last post by:
I'm trying to use this.RegisterStartupScript to add some javascript to and aspx page that will run when the page is loaded. Does anyone know if this function only works in the Page_Load function? ...
0
by: George Durzi | last post by:
I have a datagrid with a select button in it. When the button is clicked, I want to kick off a mailto: to email the datagrid row. The user would specify the recipients, and hit Send himself. ...
2
by: Ollie | last post by:
I use javascript to open a child window from the browser (window.open.....) this is then registered with the system using Page.RegisterStartupScript, it display the child peffectly fine. The...
4
by: Joseph Burton | last post by:
When I put this code in my load function it works just fine. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RegisterStartupScript("",...
3
by: MJP | last post by:
I have a button which kicks off the generation of a report after which the file will be downloaded. The report generation can take a long time, so client side onclick event of the button also...
0
by: Vinodsrvk | last post by:
Hi, I tried calling a RegisterStartupScript from c#, my code looks as bellow string strRpt = "<script language='JavaScript'> \r " + "function OpenReports() { \r " +...
4
by: Vinodsrvk | last post by:
Hi, I tried calling a RegisterStartupScript from c#, my code looks as bellow string strRpt = "<script language='JavaScript'> \r " + "function OpenReports() { \r " +...
0
by: Moe Sisko | last post by:
Using ASP.NET 2.0 . When a certain button is pressed on Page "A", I perform some server side processing, then call Page.ClientScript.RegisterStartupScript to attach some javascript, which...
9
by: 0301102 | last post by:
I using following script in my project. Once click the button and there will open a pop up window. But "Page.ClientScript.RegisterStartupScript" script seem NOT working in update panel. After remove...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.