By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,012 Members | 1,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,012 IT Pros & Developers. It's quick & easy.

How to disable Javascript/DynHTML/popups inside the browser window?

P: n/a
During the last months I obeserved a growing number of web pages with popups
inside a web page. I don't know the technique by which these in-page-windows
are implemented (either Javascript or HTML?). They contain a "close" resp. "x"
button/link to click them away.

They are however not detectable by "normal" popup blockers.

How can I otherwise turn these popup windows automatically (!) off otherwise?

Marcus

Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Mon, 17 Jan 2005 18:55:27 +0100, ot***@gmx.net (Marcus Otmarsen)
wrote:
During the last months I obeserved a growing number of web pages with popups
inside a web page. I don't know the technique by which these in-page-windows
are implemented (either Javascript or HTML?). They contain a "close" resp. "x"
button/link to click them away.

They are however not detectable by "normal" popup blockers.

How can I otherwise turn these popup windows automatically (!) off otherwise?


With great difficulty, it's the main reason I was so disappointed with
the rise of popup-blockers, disabling pop-ups is easy, disabling these
awful things can only really be achieved by disabling javascript or
CSS. Anything else involves loads more work.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 23 '05 #2

P: n/a
Hi,
[...] popups inside a web page. I don't know the technique by which
these in-page-windows are implemented (either Javascript or HTML?).
They contain a "close" resp. "x" button/link to click them away. I guess they are absolute position divs. Per JS they are set to
display:none if you click the "x".
They are however not detectable by "normal" popup blockers.
How can I otherwise turn these popup windows automatically (!) off
otherwise?

If it's like that you can't block them, because it's impossible to see
which div is an ad and which isn't.

Chris
Jul 23 '05 #3

P: n/a
"Marcus Otmarsen" <ot***@gmx.net> wrote in message
news:cs*************@news.t-online.com...
During the last months I obeserved a growing number of web pages with
popups
inside a web page. I don't know the technique by which these
in-page-windows
are implemented (either Javascript or HTML?). They contain a "close"
resp. "x"
button/link to click them away.
Without a link to an example site, it's impossible to say. Most likely
the "popup" is a <div> positioned above any existing text on the page.
They are however not detectable by "normal" popup blockers.
It's unlikely they will ever be. It's fairly easy to detect the opening
of a new window, it's less likely anything could detect the creation or
manipulation of a <div> on a Web page. For example:

<script type="text/javascript">
var s =
document.createElement('d!@#$%^&*()i!@#$%^&*()v'.s plit(/!@#$%^&*\(\)/).join(''));
with (s.style)
{
position = 'absolute';
top = left = '10px';
width = height = '100%';
backgroundColor = 'Black';
}
eval('\u0076\u0061\u0072\u0020\u0061\u006c\u0065\u 0072\u0074\u0020\u003d\u0020\u0066\u0075\u006e\u00 63\u0074\u0069\u006f\u006e\u0028\u0078\u0029\u0020 \u007b\u0020\u0072\u0065\u0074\u0075\u0072\u006e\u 0020\u0064\u006f\u0063\u0075\u006d\u0065\u006e\u00 74\u002e\u0062\u006f\u0064\u0079\u002e\u0061\u0070 \u0070\u0065\u006e\u0064\u0043\u0068\u0069\u006c\u 0064\u0028\u0078\u0029\u003b\u0020\u007d\u003b');
alert(s);
</script>

In a language where even built-in functionality an be overwritten to do
something completely different, it's almost impossible to intercept and
act on every possible combination of script actions. I suppose one could
argue that a the browser could intercept any attempt to createElement()
and stop it, or when JavaScript attempts to change the -visibility-
or -display- style of any HTML element stop that, or when you try to
reposition a visible <div> that is currently off-screen on the viewport,
stop that. But if you do all that, well, you might as well not include
any of that functionality in the first place, because some of it is very
useful.

When the browser detects window.open() (or an alias of window.open())
being called without user interaction, only one thing is happening, a
new window is being opened. That action can be subverted. The malicious
creating, changing the visibility of, or re-positioning of elements is
much harder to subvert without possibly destroying all functionality on
the Web page that you enabled script to give you in the first place.
How can I otherwise turn these popup windows automatically (!) off
otherwise?


Disable JavaScript.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.