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

new windows popup blocker

Hi, when i want to open in a new windows a url, use this code.

Private Sub btnF_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnF.Click
Response.Write("<script>")
Response.Write("window.open('http://www.hotmail.com','_blank')")
Response.Write("</script>")
End Sub

I don't want that the new windows popup blocker, stop this process. Any
idea?
Nov 19 '05 #1
3 1362
The popup blocker is there for a reason - to stop popups. And it is doing
what it is supposed to.

Your users will have to turn it off in order for your application to work
the way you designed it.

"Jachu" <jp*******@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi, when i want to open in a new windows a url, use this code.

Private Sub btnF_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnF.Click
Response.Write("<script>")
Response.Write("window.open('http://www.hotmail.com','_blank')")
Response.Write("</script>")
End Sub

I don't want that the new windows popup blocker, stop this process. Any
idea?

Nov 19 '05 #2
Yes, this type of code is blocked by many popup blockers.

You can get around this by using client-side script.

Choice 1: embed the script in the aspx page

Choice 2: set the script in code-behind by doing something like this:

btnButton.Attributes.Add("onClick","window.open('h ttp://www.hotmail.com','_blank')")

I prefer choice #2 since it helps keep all your code in one place.

Good luck!

---Selden

"Jachu" <jp*******@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi, when i want to open in a new windows a url, use this code.

Private Sub btnF_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnF.Click
Response.Write("<script>")
Response.Write("window.open('http://www.hotmail.com','_blank')")
Response.Write("</script>")
End Sub

I don't want that the new windows popup blocker, stop this process. Any
idea?

Nov 19 '05 #3
Thanks Selden, choice #2 work !!!!!.

"Selden McCabe" <se*******@adelphia.net> wrote in message
news:eY****************@tk2msftngp13.phx.gbl...
Yes, this type of code is blocked by many popup blockers.

You can get around this by using client-side script.

Choice 1: embed the script in the aspx page

Choice 2: set the script in code-behind by doing something like this:

btnButton.Attributes.Add("onClick","window.open('h ttp://www.hotmail.com','_blank')")

I prefer choice #2 since it helps keep all your code in one place.

Good luck!

---Selden

"Jachu" <jp*******@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl...
Hi, when i want to open in a new windows a url, use this code.

Private Sub btnF_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnF.Click
Response.Write("<script>")
Response.Write("window.open('http://www.hotmail.com','_blank')")
Response.Write("</script>")
End Sub

I don't want that the new windows popup blocker, stop this process. Any
idea?


Nov 19 '05 #4

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

Similar topics

38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
10
by: Agony.COM | last post by:
Hi there all, Is there a way, using Javascript, that you can detect if a popup window has opened successfully? I'm tring to work out if someone is running popup blocking software or not. ...
2
by: QA | last post by:
http://www.popupcheck.com/popup_manual/modeless.asp can still have a popup even when I have a popup blocker - google toolbar. I want to know the technology, but I can not read the source code....
26
by: Raffi | last post by:
Hi, We have a database application that runs in a popup Internet Explorer application window. The reason for this is to isolate the casual user from the address bar and the typical IE navigation...
2
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
4
by: vickeybird | last post by:
I want to know if it is possible to detect if Pop up Blocker is enabled without trying to open a Pop Up windows. I'm trying to create a web analytics script and visible Pop up in case of disabled...
3
by: Yisehaq | last post by:
Hi guys I am trying to prepare few html pages which contain OLAP cubes on a CD. The problem I have is that the popup blocker blocks the OLAP modules from being shown. Therefore, I wanted to write...
1
mageswar005
by: mageswar005 | last post by:
hi, how to detect yahoo popup blocker, in my site i open a popup window but some local pc yahoo popup blocker can control my popup window. how can i detect the popup blocker....
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.