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

popup blocking

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

Nov 20 '05 #1
3 948
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("Scripting.FileSystemObject")
Set objDictionary = CreateObject("Scripting.Dictionary")
Set objArgs = WScript.Arguments

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

If objFSO.FileExists(strFileName) Then
Set objTextFile = objFSO.OpenTextFile(strFileName, ForReading)

Do While objTextFile.AtEndOfStream <> True
strNextLine = lcase(trim(objTextFile.Readline))
'Checking the length to avoid adding blank lines...
If Len(strNextLine) > 0 Then
objDictionary.Add strNextLine,strNextLine
End If
Loop
End If

For Each objItem in objDictionary
WScript.Echo "Domain : " & Trim(objDictionary.Item(objItem))
Next
Set J=CreateObject("Shell.Application")
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.windows.Item(L).document.frames) Then
If isObject(J.Windows.Item(L).document.frames.opener) Then
If
objDictionary.Exists(lcase(J.Windows.Item(L).Docum ent.Domain)) Then
'WScript.Echo Now & " Popup window from protected domain " &
J.Windows.Item(L).Document.Domain
Else
WScript.Echo Now & " Closing Popup Window from " &
J.Windows.Item(L).Document.Domain
J.Windows.Item(L).document.frames.close
End If
End If
End If
End With
Next
Loop

<an*******@coolgroups.com> wrote in message
news:f1******************************@news.scbiz.c om...
Does anyone know where I can find some VB source for
blocking popups in IE?

Nov 20 '05 #2
* an*******@coolgroups.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*******@coolgroups.com> wrote in message
news:f1******************************@news.scbiz.c om...
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
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,...
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...
3
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...
3
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 =...
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...
15
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...
5
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...
3
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...
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...
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
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
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
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.