Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avoid popup blocking after postbacks

Status
Not open for further replies.

SBGibson

Programmer
Apr 18, 2001
125
0
0
IT
Hi guys,
I've a big problem. I need to open e popup to show an attached document that the user have selected. The problem it that I need to perform some check before opening that document so I placed a button that on postback, after some operation, writes a window.open to show the document.
The problem is that popup blocking systems blocks this popup and even if I say to my users to allow popups there a problem on IE that, if this popup contains a document like a word or pdf it doesn't block but suddenly close it due to some protection control. Reducing security level to "medium low" solves the problem but for a portal user it's an annoying thing.
There's a way to avoid this block programmatically?

Stevie B. Gibson
 
I'd try asking in the Browser Issues forum (forum608) or the relevant operating system forum as this is not an ASP.NET issue and not something you could override with server-side code (as then everyone would do it and pop up blockers would be useless and pointless!).


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Thanks, I'll try with other forums but I don't agree completely with you.
I agree that a way to bypass popup blocking makes useless popup-blocking software but as the problem is generated by the required postback to make elaborations (cause if I make a window.open directly on button click it works) maybe there was an "asp.net best pratice" to avoid this problem.
For example...make required check on the opened page, injecting checks in some way...
Btw thank for answering.

Stevie B. Gibson
 
But running some server-side code before showing the pop up isn't something that's limited to ASP.NET. If you had created the site in PHP and needed to do the same thing you would still have the same problem.

To put it another way, the problem is occurring because of the way pop up blockers work not the server side language you are using (and that's why I think you'll get better help by asking in a more appropriate forum).




____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top