The Daily WTF: Curious Perversions in Information Technology
Welcome to TDWTF Forums Sign in | Join | Help
in Search

alert title? true!

Last post 03-08-2013 4:46 PM by MiffTheFox. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 03-08-2013 8:02 AM

    alert title? true!

    Trying to close a G+ tab:

    Free Image Hosting at www.ImageShack.us

    Apart of the "true" title, I find it annoying that they even ask me if I'm sure even after I managed to click on that small x icon on the tab.

  • 03-08-2013 8:08 AM In reply to

    Re: alert title? true!

     The beforeunload is an annoyance, but the "true"bit comes from the part of its message that you're allowed to customize. And they fucked that up.


    boomzilla: I think the obvious answer is for everyone to just stop programming.

  • 03-08-2013 10:47 AM In reply to

    Re: alert title? true!

    I'm amused that this dialog asks an actual yes/no question yet has descriptive buttons.

    An interesting twist on the usual "ask a complex question that cannot be answered yes/no, but only give yes/no buttons."

  • 03-08-2013 1:28 PM In reply to

    Re: alert title? true!

    too_many_usernames:

    I'm amused that this dialog asks an actual yes/no question yet has descriptive buttons.

    That way, you don't have to read the message but can usually go just by the button titles. Far easier than seeing "Yes", "No" and "Cancel" and then having to go and read what it is the program is nagging you about.

  • 03-08-2013 1:47 PM In reply to

    Re: alert title? true!

    Gurth:
    That way, you don't have to read the message but can usually go just by the button titles. Far easier than seeing "Yes", "No" and "Cancel" and then having to go and read what it is the program is nagging you about.
     

    Thank you, Captain.


    boomzilla: I think the obvious answer is for everyone to just stop programming.

  • 03-08-2013 2:39 PM In reply to

    Re: alert title? true!

    If it was anyone but Google I'd suggest their code looked like this:

    $(window).bind('beforeunload', function(){
        if (SomeCounterGlobalThing){
            // don't let them leave while still doing the global thing!
            return false;
        } else {
            // ok you can go
            return true;
        }
    });
    

    [Sanity Not Available until further notice. The trolls have won.]

  • 03-08-2013 4:38 PM In reply to

    Re: alert title? true!

    MiffTheFox:

    If it was anyone but Google I'd suggest their code looked like this:

    [...]

    Had to implement something similar on a booking confirmation page once. Idiots Users would see their booking details and think "ow, allrighty then!" and navigate away without actually confirming the booking (despite two pretty big buttons to that affect, one at the top and one at the bottom of the page). Add a confirmation dialogue upon leaving the page and invalid booking reports dropped to pretty much zero.

    Sure, it's not pretty, but it works.

  • 03-08-2013 4:46 PM In reply to

    Re: alert title? true!

    FragFrog:

    Had to implement something similar on a booking confirmation page once. Idiots Users would see their booking details and think "ow, allrighty then!" and navigate away without actually confirming the booking (despite two pretty big buttons to that affect, one at the top and one at the bottom of the page). Add a confirmation dialogue upon leaving the page and invalid booking reports dropped to pretty much zero.

    Sure, it's not pretty, but it works.

    Well there's nothing wrong with the concept, but the problem with the code I posted was the implementation. Onbeforeunload handlers are supposed to return a string, which is displayed as a message with a confirm, or void to not ask the user and just leave the page. If true were returned, Javascript would interpert that as the string "true" and then a message like the original wtf would be displayed. This is contrary to all the other events in DOM, which expect a boolean. (Or depending on the implementation, it might ignore the return value and will cancel the event if e.preventDefault is called. Or maybe event.preventDefault. Thank god for jQuery spackling.)


    [Sanity Not Available until further notice. The trolls have won.]

Page 1 of 1 (8 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems