Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

alert and pop-up blockers

0 views
Skip to first unread message

optimistx

unread,
Nov 25, 2009, 4:48:50 AM11/25/09
to
It seems to me that pop up blockers do not prevent alert, confirm, and
prompt boxes appearing. Or do some prevent?

If there are significant number of (also alert-box-) blockers in use, how to
make an own box (e.g. a div), which does prevent the user proceeding
without clicking the button (or reacting with the keyboard, a modal dialog)?

(an idea: Is there a simple way to make the box (div?) the size of the whole
page, perhaps partially or wholly transparent except in the middle? Or can
the user proceed anyhow , whatever the programmer tries?)

Another question about alert: is there any way to modify how it looks, its
color e.g. ? (wrapper perhaps?)

Erwin Moller

unread,
Nov 25, 2009, 5:27:07 AM11/25/09
to
optimistx schreef:

> It seems to me that pop up blockers do not prevent alert, confirm, and
> prompt boxes appearing. Or do some prevent?

As far as I know alert and confirm are never blocked.
But there are many blockers out there, so maybe they exist.


>
> If there are significant number of (also alert-box-) blockers in use,

???

> how to make an own box (e.g. a div), which does prevent the user
> proceeding without clicking the button (or reacting with the keyboard, a
> modal dialog)?

Well, that is not a real modal box: it is just a div imitating an alert.
Why do you want to change the normal userinterface?
It will probably annoy a lot of users.


>
> (an idea: Is there a simple way to make the box (div?) the size of the
> whole page, perhaps partially or wholly transparent except in the
> middle? Or can the user proceed anyhow , whatever the programmer tries?)


Yes, that can be done.
You can place a new div over all other material in the document. If you
let this div catch all mouse events, the user cannot click away.
But again: I, and probably a lot of other users, would consider this
annoying in most situations.

Why not use a normal alert or confirm? We all know them and all know how
they are supposed to behave.


>
> Another question about alert: is there any way to modify how it looks,
> its color e.g. ? (wrapper perhaps?)

Not that I know of.

A general remark: Don't try to force the user to do things in ways they
don't like. And don't try to change what is considered normal.

An example: I like my hyperlink blue, and my visited hyperlinks purple.
That is what I am used to after 13 years or so websurfing.

But this can be changed via CSS.
I dislike websites who do so.
For example: Now I must remember that certain websites have red
hyperlinks, blue headers (that are not hyperlinked) and visited
hyperlinks stay red.
All very confusing. (I even had to deliver websites myself that had such
stupid hyperlinks because it looked good in a presentation and my client
prefered to listen to the kinky Photoshopboys instead of an old fart
like me. Bah.)
Luckily stylesheets can be disabled, but these kind of sites have the
habbit of failing completely without stylesheets.

Bottomline: Don't try to change the standard userinterface. It is annoying.

Just my 2 cent.

Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare

David Mark

unread,
Nov 25, 2009, 6:01:29 AM11/25/09
to
On Nov 25, 5:27 am, Erwin Moller

That's bad design because you can't rely on color _alone_ to indicate
a link (use an underline) and visited links should change color.

However, if a document changes the background color of the body, it
must change the color of hyperlinks to ensure proper contrast.

[...]

> Luckily stylesheets can be disabled, but these kind of sites have the
> habbit of failing completely without stylesheets.

That's also incompetence on the part of the designers. But you could
set !important rules in your user style sheet(s) to use blue and
purple (or whatever) for links. Just be sure to supply a suitable
background color too. And override the background image as well.
Unfortunately, most designers don't user the body as anything more
than a place to put lots of nested DIV's or tables, with lots of
convoluted style rules to match, so you will need multiple rules and
you won't be able to override the colors of all links and you will
still have contrast issues.

rf

unread,
Nov 25, 2009, 6:11:12 AM11/25/09
to

"optimistx" <opti...@hotmail.com> wrote in message
news:4b0cfd7c$0$6257$9b53...@news.fv.fi...

> It seems to me that pop up blockers do not prevent alert, confirm, and
> prompt boxes appearing. Or do some prevent?

Probably because these things are not popups. They are dialog boxes
initiated by the browser.

> If there are significant number of (also alert-box-) blockers in use, how
> to make an own box (e.g. a div), which does prevent the user proceeding
> without clicking the button (or reacting with the keyboard, a modal
> dialog)?

What?

> (an idea: Is there a simple way to make the box (div?) the size of the
> whole page, perhaps partially or wholly transparent except in the middle?
> Or can the user proceed anyhow , whatever the programmer tries?)

What are you talking about? Popups, div's covering the canvas or browser
initated dialog boxes?

> Another question about alert: is there any way to modify how it looks, its
> color e.g. ? (wrapper perhaps?)

No. It's a dialog initiated by the browser.


optimistx

unread,
Nov 25, 2009, 6:40:17 AM11/25/09
to
rf wrote:
> "optimistx" <opti...@hotmail.com> wrote in message
> news:4b0cfd7c$0$6257$9b53...@news.fv.fi...

>> If there are significant number of (also alert-box-) blockers in


>> use, how to make an own box (e.g. a div), which does prevent the
>> user proceeding without clicking the button (or reacting with the
>> keyboard, a modal dialog)?
>
> What?
>
>> (an idea: Is there a simple way to make the box (div?) the size of
>> the whole page, perhaps partially or wholly transparent except in
>> the middle? Or can the user proceed anyhow , whatever the programmer
>> tries?)
>
> What are you talking about? Popups, div's covering the canvas or
> browser initated dialog boxes?

What? :) More simply: If alert-boxes are blocked, what to do?

But they obviously are not blocked. My question aroused, when
in Chrome-browser I got a dialog box asking, whether I would
allow such boxes to appear in the future. I allowed, and now I do not
remember the situation accurately. I was pretty sure that that
was an alertbox from my program, but now I cannot reproduce
the situation easily.

If alertboxes cannot be blocked, my second question is not
so important. I thought of the possibility to add images to
the alertbox , explaining things with them easier than with
many words like here.

I appreciate Erwin M�llers views also, and the kind attitude.

Unnecessary frills ARE unnecessary :).

Tim Slattery

unread,
Nov 25, 2009, 8:56:53 AM11/25/09
to
"optimistx" <opti...@hotmail.com> wrote:

>It seems to me that pop up blockers do not prevent alert, confirm, and
>prompt boxes appearing. Or do some prevent?

They don't prevent those things. They do, in general, prevent
javascript from opening a new browser window.

Apparently Flash, and maybe other things, can get around them.

--
Tim Slattery
Slatt...@bls.gov
http://members.cox.net/slatteryt

Dr J R Stockton

unread,
Nov 26, 2009, 2:40:00 PM11/26/09
to
In comp.lang.javascript message <11cb449b-a5ee-4a83-8444-921be6cb3c97@z4
1g2000yqz.googlegroups.com>, Wed, 25 Nov 2009 03:01:29, David Mark
<dmark....@gmail.com> posted:

>However, if a document changes the background color of the body, it
>must change the color of hyperlinks to ensure proper contrast.

That's wrong, of course. A change (from standard white) can easily be
large enough to be noticed without significantly degrading the contrast
of any of the standard link colours.

"However, if a document changes the background colour of the body, it
may need to change the colour of hyperlinks to ensure proper contrast."

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

optimistx

unread,
Nov 28, 2009, 5:45:45 AM11/28/09
to
optimistx wrote:

> What? :) More simply: If alert-boxes are blocked, what to do?
>
> But they obviously are not blocked. My question aroused, when
> in Chrome-browser I got a dialog box asking, whether I would
> allow such boxes to appear in the future. I allowed, and now I do not
> remember the situation accurately. I was pretty sure that that
> was an alertbox from my program, but now I cannot reproduce
> the situation easily.

Now the alertbox 'problem' was recreated:

Chrome had a checkbox in the the second alertbox from the same page,
with the text 'Prevent this page to create other messages' (freely
translated). If I put a checkmark there, no new alertboxes appear.
If a user accidentally puts a checkmark there, the program might not
know that and the program, user, and everybody might be very
confused. Ok, we user's make mistakes sometimes, but clever
programs might minimize damages.

This is not a serious issue anyhow. I could start a timer and then
show a div to explain what might have happened.

By the way,

Chrome is really fast compared to Firefox 3.0. A Runge-Kutta algorithm
with some dom manipulation (not much)
took 6 seconds in Chrome, 36 seconds in firefox, and 2 minutes in ie7.
Some people say that Google programmers are not so good, but this
result might prove that some programmers there know something (or
perhaps my test is biased).

0 new messages