473,414 Members | 1,692 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,414 software developers and data experts.

Pop-up window showing but not loading after SP2

I have an ASP.NET webapp that generates a shipping label for a
customer. When the user clicks on the label preview gif or on a
"Print..." submit button, the app will open another window with a full
sized label.

Before I installed SP2 my workstation, all worked fine. However, now
with SP2 it opens the label window, but the page doesn't load in the
browser. When debugging in VS.NET, the Page_Init of the pop-up page
does not even run. This is only an issue with IE and no other
browsers. I've done about every Security setting in the Internet
Options as well (and turned off popup blocking).
Here is a rundown of what the code is like:

1. The LabelPreview.aspx page has a Print button that generates a
script to open a pop-up window:

Dim popUpWindow As String =
"<scriptlanguage='javascript'>window.open('PrintVi ew.aspx')</script>"
RegisterStartupScript("popUpWindow", popupWindow)
2. PrintView.aspx uses another aspx page as an image (example; <img
src="Label.aspx">) and has behind-code that writes to an internal
database...note: the Page_Init in the behind-code is not firing.
3. Label.aspx is used to stream the image. Tt has mLabel as a member
object which is coming from a session variable that was generated even
before the user reaches these pages:

Dim stream As MemoryStream = New MemoryStream
Dim buffer As Byte()

mLabel = Session("objLabel")

mLabel.Image.Save(stream, Imaging.ImageFormat.Png)
buffer = stream.ToArray
Response.ContentType = "multipart/mixed"
Response.OutputStream.Write(buffer, 0, buffer.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
stream.Close()
I am at a complete loss as to why this is not working. Anyone else
experience this...any ideas are extremely appreciated.

- Richard

Nov 18 '05 #1
3 3746
Please see release notes for SP2. Popup Windows are now blocked by default.
The code must be fired by user interaction. When you use a click event and
generate the JS code, you are actually doing a postback to the server and
coming back with a new page that is attempting to load a popup window
"automatically". That is why it gets blocked. Change your code to have an
HTML button that fires the popup window.

Good Luck!

"Richard" <ri*********@gmail.com> wrote in message
news:cg********@odak26.prod.google.com...
I have an ASP.NET webapp that generates a shipping label for a
customer. When the user clicks on the label preview gif or on a
"Print..." submit button, the app will open another window with a full
sized label.

Before I installed SP2 my workstation, all worked fine. However, now
with SP2 it opens the label window, but the page doesn't load in the
browser. When debugging in VS.NET, the Page_Init of the pop-up page
does not even run. This is only an issue with IE and no other
browsers. I've done about every Security setting in the Internet
Options as well (and turned off popup blocking).
Here is a rundown of what the code is like:

1. The LabelPreview.aspx page has a Print button that generates a
script to open a pop-up window:

Dim popUpWindow As String =
"<scriptlanguage='javascript'>window.open('PrintVi ew.aspx')</script>"
RegisterStartupScript("popUpWindow", popupWindow)
2. PrintView.aspx uses another aspx page as an image (example; <img
src="Label.aspx">) and has behind-code that writes to an internal
database...note: the Page_Init in the behind-code is not firing.
3. Label.aspx is used to stream the image. Tt has mLabel as a member
object which is coming from a session variable that was generated even
before the user reaches these pages:

Dim stream As MemoryStream = New MemoryStream
Dim buffer As Byte()

mLabel = Session("objLabel")

mLabel.Image.Save(stream, Imaging.ImageFormat.Png)
buffer = stream.ToArray
Response.ContentType = "multipart/mixed"
Response.OutputStream.Write(buffer, 0, buffer.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
stream.Close()
I am at a complete loss as to why this is not working. Anyone else
experience this...any ideas are extremely appreciated.

- Richard

Nov 18 '05 #2
Hi,

Ok I assume this is a typo
<scriptlanguage='javascript'>

How is that script linked to the Print button......?

Zonealarm on the system... ( Kills the most basic of scripts even it's told
to leave alone )

I have not had a single problem with any app I have made on SP2...
Send me complete code and I will look it over if you want

--
Best Regards
Vidar Petursson
==============================
Microsoft Visual: Scripting MVP 2000-2004
http://www.icysoft.com/
http://www.deus-x.com/ Instant e-commerce
http://www.microsoft.com/technet/scriptcenter/
Playground: http://213.190.104.211/ ( IE 5.5+ only )

No matter where you go there you are
==============================
"Richard" <ri*********@gmail.com> wrote in message
news:cg********@odak26.prod.google.com...
I have an ASP.NET webapp that generates a shipping label for a
customer. When the user clicks on the label preview gif or on a
"Print..." submit button, the app will open another window with a full
sized label.

Before I installed SP2 my workstation, all worked fine. However, now
with SP2 it opens the label window, but the page doesn't load in the
browser. When debugging in VS.NET, the Page_Init of the pop-up page
does not even run. This is only an issue with IE and no other
browsers. I've done about every Security setting in the Internet
Options as well (and turned off popup blocking).
Here is a rundown of what the code is like:

1. The LabelPreview.aspx page has a Print button that generates a
script to open a pop-up window:

Dim popUpWindow As String =
"<scriptlanguage='javascript'>window.open('PrintVi ew.aspx')</script>"
RegisterStartupScript("popUpWindow", popupWindow)
2. PrintView.aspx uses another aspx page as an image (example; <img
src="Label.aspx">) and has behind-code that writes to an internal
database...note: the Page_Init in the behind-code is not firing.
3. Label.aspx is used to stream the image. Tt has mLabel as a member
object which is coming from a session variable that was generated even
before the user reaches these pages:

Dim stream As MemoryStream = New MemoryStream
Dim buffer As Byte()

mLabel = Session("objLabel")

mLabel.Image.Save(stream, Imaging.ImageFormat.Png)
buffer = stream.ToArray
Response.ContentType = "multipart/mixed"
Response.OutputStream.Write(buffer, 0, buffer.Length)
Response.OutputStream.Flush()
Response.OutputStream.Close()
stream.Close()
I am at a complete loss as to why this is not working. Anyone else
experience this...any ideas are extremely appreciated.

- Richard

Nov 18 '05 #3
Sorry I haven't responded to this recently, but I haven't needed to
investigate this problem again until recently.

Petursson, yes, that was a typo...and the script is linked to a
asp:button and thus runs a registered script (code behind includes the
Page.RegisterStartupScript function).

I'm not comfortable without having an explanation, but all runs fine
now and I don't have a clue what is different. I'm not sure if SP2 had
some additional updates that fixed this issue, or if it is from the
GDI+ updates included with the newer security patches.

All I can say is that I tested this in late August 2004 with a
workstation and a laptop when SP2 was new, both with XP Professional,
both with the same results. Come late 2004, and the problem as been
fixed without me changing code.

Nov 19 '05 #4

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

Similar topics

4
by: Roy Smith | last post by:
In the recent "transforming a list into a string" thread, we've been discussing the fact that list.pop() is O(1), but list.pop(0) is O(n). I decided to do a little timing experiment. To be sure,...
4
by: Andre | last post by:
Hi guys, newbie question. I am having trouble with a script that is supposed to login me to my account on yahoo pop server. When i do this: import getpass, poplib, re POPHOST =...
1
by: spencer | last post by:
Hi, The code. def buildStackMajor(): for node in dirStackMinor: #print 's is the node...', node dirStackMajor.append(node) dirStackMinor.pop() print 'POP the stack...', len(dirStackMinor)...
6
by: Will | last post by:
Hi, Sorry to be a pest... But I can figure this out. I'm pushing to a stack. then I need to check to see if the word is a palindrome. Is the code below correct? if so, how can I check the...
2
by: John Hoge | last post by:
I would like to open an exit pop when a user leaves my site, but I don't want to the back button to trigger the pop if the user remains in my site. I'm using the onUnload attribute of the Body...
15
by: Stig Brautaset | last post by:
Hi group, I'm playing with a little generic linked list/stack library, and have a little problem with the interface of the pop() function. If I used a struct like this it would be simple: ...
25
by: Nicholas Parsons | last post by:
Howdy Folks, I was just playing around in IDLE at the interactive prompt and typed in dir({}) for the fun of it. I was quite surprised to see a pop method defined there. I mean is that a...
7
by: Scott | last post by:
As said before I'm new to programming, and I need in depth explaination to understand everything the way I want to know it, call it a personality quirk ;p. With pop() you remove the last element...
4
by: j_depp_99 | last post by:
The program below fails on execution and I think the error is in my pop function but it all looks correct.Also could someone check my code as to why my print function is not working? I havent...
20
by: merrittr | last post by:
I need some C advice I want to read in string commands from a user when the user enters a \n I want to push it on the stac. Then at some point , if the user enters the word print pop off and print...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.