There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
black screen blue screen boot bsod computer connection crash css dell display driver drivers email error explorer firefox firefox 3 hard drive internet internet explorer itunes laptop lcd malware monitor network networking nvidia outlook outlook 2003 outlook express password printer problem problems ram router security slow software sound sprtcmd.exe trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: Javascript based popup blocker


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
dipunm's Avatar
Junior Member with 22 posts.
 
Join Date: Mar 2005
Experience: Intermediate
03-Mar-2005, 12:55 PM #1
Unhappy Solved: Javascript based popup blocker
i am creating web based browser that goes only to specific sites... however, one of the sites has a popup and after a bit of research, i have found the source of the popups. If posssible, i would like to prevent popups from the iframe, but otherwise, i need for the popup to close itself before the user realises there was a popup.

the popup was called by javascript...
'window.open("URL","TARGET","")'
however, it doesn't use
'blah = window.open(...'
so i can't use the function 'blah.close()'

dont want to use a link on page because i want it to close the popup automatically.... can any1 help me?
jd_957's Avatar
Account Disabled with 1,224 posts.
 
Join Date: Dec 2004
03-Mar-2005, 01:16 PM #2
sorry to say. iam lost when it comes to java. the bright side. i think i found something you can make use of.

http://javascript.about.com/od/popupwindows/index.htm
dipunm's Avatar
Junior Member with 22 posts.
 
Join Date: Mar 2005
Experience: Intermediate
03-Mar-2005, 01:23 PM #3
Quote:
Originally Posted by jd_957
sorry to say. iam lost when it comes to java. the bright side. i think i found something you can make use of.

http://javascript.about.com/od/popupwindows/index.htm
thanks man.... y block a popup when u can redirect it and then get it to close itself.... its all in the link.... thanx agen... ure a life saver!!!!!
dipunm's Avatar
Junior Member with 22 posts.
 
Join Date: Mar 2005
Experience: Intermediate
03-Mar-2005, 01:25 PM #4
um... im new 2 this forum... or any forum as a matter of fact, how do i give u rating points... can i give u rating points?

-----------------------
4 our clever frend jd 957
jd_957's Avatar
Account Disabled with 1,224 posts.
 
Join Date: Dec 2004
04-Mar-2005, 08:10 AM #5
a thank you is good enough.

rating points are not used in this forum.

but, to really say thanks, stick around and have fun. visit the arcade. try to help where you can. and if you have any other questions, feel free to ask.
korsuas's Avatar
Junior Member with 3 posts.
 
Join Date: Apr 2005
12-Apr-2005, 08:42 AM #6
hi dipunm,

can you tell me what was the solution to your problem?

the link just isn't enough...

regards,
Adrian Korsuas
dipunm's Avatar
Junior Member with 22 posts.
 
Join Date: Mar 2005
Experience: Intermediate
12-Apr-2005, 02:28 PM #7
Quote:
Originally Posted by korsuas
hi dipunm,

can you tell me what was the solution to your problem?

the link just isn't enough...

regards,
Adrian Korsuas
Basically, i set a timer to allow time for the popup, then using the target name, redirected it to a page which automatically closed it!

original:
window.open('http:\\locationofad','Target Name')

Mine:
window.open('http:\\locationofclosewindow.html','Target Name');

Because the target name is the same, the page will redirect to the new location without opening a new window (unless the popup has an onunload popup)

hope this helps

While im here tho, i still havent been able to find a way to detect if a window with a specific target name exists before I create my popup/redirector

If you or any1else can help, id much appreciate it.

thanx
korsuas's Avatar
Junior Member with 3 posts.
 
Join Date: Apr 2005
13-Apr-2005, 01:54 AM #8
hi dipunm,

thx for the answer, it really does the trick

I wonder why I couldn't think of that

regarding your question, I have no answer for that. it's really interesting what your asking, but I dunno have a clue...

thank you very much,
regards,
Adrian Korsuas

PS
well, considering the opened window has a property called parent or opener !? to go to the parent window, maybe you can somehow enumerate... children ... !? I'm really not sure about this...
worth trying though
korsuas's Avatar
Junior Member with 3 posts.
 
Join Date: Apr 2005
13-Apr-2005, 02:49 AM #9
look what I found:

Quote:
The open( ) method looks up an existing window or opens a new browser window. If the name argument specifies the name of an existing window, a reference to that window is returned. The returned window displays the URL specified by url, but the features argument is ignored. This is the only way in JavaScript to obtain a reference to a window which is known only by name.



http://pauli.utmb.edu/yuan/unix/web_...pt/ch24_01.htm

If you find a solution, please post it.


Thank you,
Adrian Korsuas
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:13 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.