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

Testing for Javascript (marketing-style)

Last post 11-23-2013 11:05 PM by Lorne Kates. 22 replies.
Page 1 of 1 (23 items)
Sort Posts: Previous Next
  • 11-21-2013 1:28 PM

    • spinn
    • Not Ranked
    • Joined on 08-16-2009
    • Posts 8

    Testing for Javascript (marketing-style)

    This bit of javascript, written by our marketing people, keeps bending my brain the more I try to think about it:

    var js_active = 1;


    Used in conditionals in various places to determine whether javascript is active or not:

    if ((js_active == 1) && (username != "")) { ...


    Filed under:
  • 11-21-2013 1:35 PM In reply to

    Re: Testing for Javascript (marketing-style)

    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
    <noscript> alert('We require additional Javascript'); </noscript>
    
    [quote user="blakeyrat"]This forum is the worst, and you all are the worst, and mikeTheLiar you're the worst of the worst.[/quote]
  • 11-21-2013 1:38 PM In reply to

    Re: Testing for Javascript (marketing-style)

    mikeTheLiar:
    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
    <noscript> alert('We require additional Javascript more minerals'); </noscript>
    
    SCTFY
    Signatures are stupid.
  • 11-21-2013 1:39 PM In reply to

    • locallunatic
    • Top 50 Contributor
    • Joined on 05-19-2010
    • (YourLocation==USA-KY?local:MisleadingUsername)
    • Posts 838

    Re: Testing for Javascript (marketing-style)

    spinn:
    This bit of javascript, written by our marketing people

    Why are marketing people writing javascript?  I mean yeah the code is bad, but the bigger WTF is why non-tech people are writing code in your company.

    Filed under: ,
  • 11-21-2013 1:40 PM In reply to

    • dkf
    • Top 50 Contributor
    • Joined on 04-24-2008
    • Manchester, UK
    • Posts 1,138

    Re: Testing for Javascript (marketing-style)

    mikeTheLiar:
    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
    <noscript> alert('We require additional Javascript'); </noscript>
    
    Needs a slight adjustment:
    <noscript> <script>alert('We require additional Javascript');</script> </noscript>
  • 11-21-2013 1:41 PM In reply to

    • dkf
    • Top 50 Contributor
    • Joined on 04-24-2008
    • Manchester, UK
    • Posts 1,138

    Re: Testing for Javascript (marketing-style)

    joe.edwards:
    mikeTheLiar:
    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
    <noscript> alert('We require additional Javascript more minerals'); </noscript>
    
    SCTFY
    Or more plebs.
    Filed under:
  • 11-21-2013 1:46 PM In reply to

    • spinn
    • Not Ranked
    • Joined on 08-16-2009
    • Posts 8

    Re: Testing for Javascript (marketing-style)

    locallunatic:
    Why are marketing people writing javascript?  I mean yeah the code is bad, but the bigger WTF is why non-tech people are writing code in your company.

    Oy...you know, I dropped the original in Sidebar because it was a quick little thing. if I were to get started on answering that question, I'd probably have to mail you the first few volumes of the answer in a year or so.

  • 11-21-2013 4:11 PM In reply to

    • TGV
    • Top 75 Contributor
    • Joined on 10-09-2005
    • Posts 705

    Re: Testing for Javascript (marketing-style)

    locallunatic:
    Why marketing people to write the javascript?

    a) Because marketing is responsible for the web pages, and javascript is web

    b) Only sales people have budget for programming tasks

    c) The head of IT runs a strict C# shop, so IT won't do JS

    d) All of the above

     

  • 11-21-2013 4:20 PM In reply to

    • locallunatic
    • Top 50 Contributor
    • Joined on 05-19-2010
    • (YourLocation==USA-KY?local:MisleadingUsername)
    • Posts 838

    Re: Testing for Javascript (marketing-style)

    TGV:

    a) Because marketing is responsible for the web pages, and javascript is web

    b) Only sales people have budget for programming tasks

    c) The head of IT runs a strict C# shop, so IT won't do JS

    d) All of the above

    If any of the first three is true then found TRWTF, and if d is then it sounds like workplace violence is needed to protect anyone else from taking a job with the company.

    Filed under: ,
  • 11-21-2013 5:33 PM In reply to

    • Ronald
    • Top 25 Contributor
    • Joined on 05-16-2013
    • Flying on a jetplane
    • Posts 1,633

    Re: Testing for Javascript (marketing-style)

    dkf:
    joe.edwards:
    mikeTheLiar:
    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
    <noscript> alert('We require additional Javascript more minerals'); </noscript>
    
    SCTFY
    Or more plebs.

    Or more cowbell.

    Hit Counter
  • 11-21-2013 5:54 PM In reply to

    Re: Testing for Javascript (marketing-style)

    Ronald:
    dkf:
    joe.edwards:
    mikeTheLiar:
    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:

    <noscript> alert('We require additional Javascript more minerals'); </noscript>
    
    SCTFY
    Or more plebs.

    Or more cowbell.

    YES!


     

  • 11-21-2013 8:52 PM In reply to

    • Ben L.
    • Top 10 Contributor
    • Joined on 12-21-2010
    • Inventor of the 186-hour work week
    • Posts 3,607

    Re: Testing for Javascript (marketing-style)

    joe.edwards:
    mikeTheLiar:
    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:
    <noscript> alert('We require additional Javascript more minerals'); </noscript>
    
    SCTFY
    YOU MUST CONSTRUCT ADDITIONAL PYLONS
  • Morbs is the smartest!
  • 11-21-2013 9:06 PM In reply to

    Re: Testing for Javascript (marketing-style)

    spinn:
    This bit of javascript, written by our marketing people
    This concept keeps bending my brain the more I try to think about it.
  • 11-22-2013 1:27 AM In reply to

    Re: Testing for Javascript (marketing-style)

    Ben L.:
    joe.edwards:
    mikeTheLiar:
    Reminds me off something I saw...somewhere, probably on this site. IIRC it went a little something like this:

    <noscript> alert('We require additional Javascript more minerals'); </noscript>
    
    SCTFY
    YOU MUST CONSTRUCT ADDITIONAL PYLONS

     

  • 11-22-2013 3:56 AM In reply to

    • PJH
    • Top 10 Contributor
    • Joined on 02-14-2007
    • Newcastle, UK
    • Posts 3,916

    Re: Testing for Javascript (marketing-style)

    locallunatic:

    spinn:
    This bit of javascript, written by our marketing people

    Why are marketing people writing javascript?

    Probably because of the same reason I'm currently writing in php despite my working in a software department (i.e. C-based.) "Someone in the department knows a bit of it so we won't bother <proper department> with it...."

    As it happens, yes, we do have qualified people who know what they're doing when it comes to user interfaces on websites - a whole department of them- and, no, I'm not one of them. Why do you ask?
    "Because you watched 'The Very Hungry Caterpillar,' we recommend 'The Human Centipede.'"
    --
    UED - Countryside: To kill Piers Morgan
  • Parp!
  • 11-22-2013 4:49 AM In reply to

    • Zecc
    • Top 25 Contributor
    • Joined on 06-12-2007
    • and hasn't left since.
    • Posts 2,064

    Re: Testing for Javascript (marketing-style)

    Well, did you at least show them how the code should be fixed?

    var js_active = true;
    if (js_active && (username != "")) { ...
    If mixed metaphors were illegal, I'd be having an indigestion.
    typeof NaN == 'number'
    var ò_ó, ಠ⁔ಠ, ᄒᆺᄒ, ᅙᅳᅙ, ᖛᨓᖜ, ꖴᅩꖴ, ఠᨋఠ; // Naming your variables is serious business
  • 11-22-2013 6:26 AM In reply to

    Re: Testing for Javascript (marketing-style)

    Could be worse. What would you think if you found if( js_active != 1 )?
    I denounce myself for this post
  • 11-22-2013 11:08 AM In reply to

    Re: Testing for Javascript (marketing-style)

    Zecc:

    Well, did you at least show them how the code should be fixed?

    var js_active = true;
    if (js_active && (username != "")) { ...
    Or how about...
        if (!js_active) {
            //send to page that explains that this site requires javascript
            window.location.replace("javascript_is_required.html");
        }
        else if (username != "") { ...
    
  • 11-22-2013 11:09 AM In reply to

    Re: Testing for Javascript (marketing-style)

    Ronald:

    Or more cowbell.

    Everything should require that

  • 11-22-2013 11:55 AM In reply to

    Re: Testing for Javascript (marketing-style)

    if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
    This is a signature. It's not a good one, but it's still a signature.


  • Mon, February 30 2010 2:64 PM

    • Fabulous Darth Vader
    • Top 10 Contributor
    • Joined a long, long time ago
    • In a Glittery galaxy far, far away
    • Posts π x 10-14


    I have cornified this post, pray I don't cornify it further.






  • Filed under:
  • 11-22-2013 3:59 PM In reply to

    • lolwtf
    • Top 150 Contributor
    • Joined on 04-02-2008
    • (null)
    • Posts 490

    Re: Testing for Javascript (marketing-style)

    mott555:
    if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
    "Our website doesn't support Linux/Mac."
    (null)
  • 11-22-2013 5:27 PM In reply to

    • Ben L.
    • Top 10 Contributor
    • Joined on 12-21-2010
    • Inventor of the 186-hour work week
    • Posts 3,607

    Re: Testing for Javascript (marketing-style)

    lolwtf:
    mott555:
    if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
    "Our website doesn't support Linux/Mac." Filed under: ,
    I wonder what goes through those developers' minds when they decide to redirect their website (which works in mobile browsers because they're not stupid) to a single-page summary of their entire 5000 page website.
  • Morbs is the smartest!
  • 11-23-2013 11:05 PM In reply to

    Re: Testing for Javascript (marketing-style)

    mott555:
    if ((pc_on && browser_isRunning && !pc_inBSOD && windows_isBooted && js_active && !armageddon.hasHappened) {...
     

    Needs an AJAX call to http://www.hasthelhcdestroyedtheearth.com/


    HardwareGeek:

    <blink> and you're dead!



    "Where is grumpy cat?"
    - Mozilla's MOST ADVANCED USER!
Page 1 of 1 (23 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems