alert and pop-up blockers

Discussion in 'Javascript' started by optimistx, Nov 25, 2009.

  1. optimistx

    optimistx Guest

    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?)
     
    optimistx, Nov 25, 2009
    #1
    1. Advertising

  2. optimistx

    Erwin Moller Guest

    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
     
    Erwin Moller, Nov 25, 2009
    #2
    1. Advertising

  3. optimistx

    David Mark Guest

    On Nov 25, 5:27 am, Erwin Moller
    <> wrote:
    > 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.


    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.
     
    David Mark, Nov 25, 2009
    #3
  4. optimistx

    rf Guest

    "optimistx" <> wrote in message
    news:4b0cfd7c$0$6257$...
    > 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.
     
    rf, Nov 25, 2009
    #4
  5. optimistx

    optimistx Guest

    rf wrote:
    > "optimistx" <> wrote in message
    > news:4b0cfd7c$0$6257$...


    >> 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 :).
     
    optimistx, Nov 25, 2009
    #5
  6. optimistx

    Tim Slattery Guest

    "optimistx" <> 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

    http://members.cox.net/slatteryt
     
    Tim Slattery, Nov 25, 2009
    #6
  7. In comp.lang.javascript message <11cb449b-a5ee-4a83-8444-921be6cb3c97@z4
    1g2000yqz.googlegroups.com>, Wed, 25 Nov 2009 03:01:29, David Mark
    <> 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)
     
    Dr J R Stockton, Nov 26, 2009
    #7
  8. optimistx

    optimistx Guest

    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).
     
    optimistx, Nov 28, 2009
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Barnard

    Avoiding pop up blockers?

    Mike Barnard, Feb 18, 2008, in forum: HTML
    Replies:
    10
    Views:
    758
    Travis Newbury
    Feb 19, 2008
  2. Bijoy Naick

    BBC Site and Popup Blockers

    Bijoy Naick, Jul 29, 2004, in forum: Javascript
    Replies:
    7
    Views:
    121
    Grant Wagner
    Jul 30, 2004
  3. D
    Replies:
    2
    Views:
    78
    McKirahan
    Nov 8, 2004
  4. optimistx

    Alert box and pop up blockers?

    optimistx, Oct 5, 2009, in forum: Javascript
    Replies:
    4
    Views:
    120
    Thomas 'PointedEars' Lahn
    Oct 7, 2009
  5. optimistx

    pop up blockers

    optimistx, Oct 13, 2009, in forum: Javascript
    Replies:
    2
    Views:
    97
    optimistx
    Oct 20, 2009
Loading...

Share This Page