473,651 Members | 3,049 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

popup blocking

Does anyone know where I can find some VB source for
blocking popups in IE?

Nov 20 '05 #1
3 953
Here is something I came up with a few months ago on the same thing... This
is old code and I did not retest it... It lets you define a list of domain
that is okay for popups from...

Robert

Const ForReading = 1
on error resume Next
strFileName = "DomainList.txt "
Set objFSO = CreateObject("S cripting.FileSy stemObject")
Set objDictionary = CreateObject("S cripting.Dictio nary")
Set objArgs = WScript.Argumen ts

If objArgs.Count > 0 Then
If objFSO.FileExis ts(objArgs(0)) Then
strFileName = objArgs(0)
End If
End If

If objFSO.FileExis ts(strFileName) Then
Set objTextFile = objFSO.OpenText File(strFileNam e, ForReading)

Do While objTextFile.AtE ndOfStream <> True
strNextLine = lcase(trim(objT extFile.Readlin e))
'Checking the length to avoid adding blank lines...
If Len(strNextLine ) > 0 Then
objDictionary.A dd strNextLine,str NextLine
End If
Loop
End If

For Each objItem in objDictionary
WScript.Echo "Domain : " & Trim(objDiction ary.Item(objIte m))
Next
Set J=CreateObject( "Shell.Applicat ion")
Do
WScript.StdOut. Write Now
WScript.Sleep 900
WScript.StdOut. Write String(Len(Now) ,Chr(8))
For L=0 to J.windows.count-1
With J.windows.item( L)
If IsObject(J.wind ows.Item(L).doc ument.frames) Then
If isObject(J.Wind ows.Item(L).doc ument.frames.op ener) Then
If
objDictionary.E xists(lcase(J.W indows.Item(L). Document.Domain )) Then
'WScript.Echo Now & " Popup window from protected domain " &
J.Windows.Item( L).Document.Dom ain
Else
WScript.Echo Now & " Closing Popup Window from " &
J.Windows.Item( L).Document.Dom ain
J.Windows.Item( L).document.fra mes.close
End If
End If
End If
End With
Next
Loop

<an*******@cool groups.com> wrote in message
news:f1******** *************** *******@news.sc biz.com...
Does anyone know where I can find some VB source for
blocking popups in IE?

Nov 20 '05 #2
* an*******@coolg roups.com scripsit:
Does anyone know where I can find some VB source for
blocking popups in IE?


Why invent things that have already been invented?

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Nov 20 '05 #3
In addition to the other comments:

Did you check MSDN?

One article I know about is:
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

I want to say there is another article in msdnmag, however I'm not sure what
the keywords are... (it is POPUP, POP UP, POP-UP, or something else).

Hope this helps
Jay

<an*******@cool groups.com> wrote in message
news:f1******** *************** *******@news.sc biz.com...
Does anyone know where I can find some VB source for
blocking popups in IE?

Nov 20 '05 #4

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

Similar topics

13
5845
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields, etc. if an error occurs, i'm sending the user a message via the alert window. the form is then not submitted until the errors are corrected. however, i've discovered that some users using the aol browser are
38
5047
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 out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
3
1941
by: Dan | last post by:
First, I'm sorry if this question has been asked too many times. I'm new to this news group. The question has to do with the use of popup windows in a web page. I have heard that popup windows should be avoided; due to use of popup blockers and browser that do not process javascript. Is the use of popup windows bad design? Will it severly reduce the usage of our web page?
3
3135
by: Jeppe bob Dyrby | last post by:
I have a page that automaticly opens a small popup window, but it is only supposed to open this window once. A little info: function openwindow(name_var) { if (!name_var) { name_var = window.open(...); } } First of: Is that at all posible? To have a variable that holds the
2
3280
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. Anyone knows the trick to get around the blocker?
26
6810
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 buttons. The application has a browser test page that displays an error message when a popup blocker is found and opens a popup page stating the test was successfull if there is no popup blocker.
15
18729
by: | last post by:
So many websites can get around my Googlebar's popup blockers. Even Opera 8 can not stop those popups. I looked into the codes, and I can find nothing showing me how it is done. Can anyone help me find what how it is done? First go to http://www.sitepoint.com/forums/showthread.php?t=184025&page=1&pp=25 Click on Last ? on the page
5
2093
by: Simon Knox | last post by:
Hi I have a web app that has a legitimate use for pop up windows. My web app is an insurance quoting app. I use the window.open method to display another aspx page so that the user can check some information without losing where they are up to in the application process.
3
2769
by: cmo | last post by:
Well I hope I this isn't too nebulous of a problem. The problem I currently have is this: I have a button in a form that opens up a javascript/css poup that has an input field and two ahref links for ok and cancel, both of which call the popup's toggle() method (same thing that is called from the button). The form that this button is in has fields that can be added or removed by the user. Everything works great in firefox and netscape,...
0
8361
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8807
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7299
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6158
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.