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

Browse by Tags

All Tags » javascript (RSS)
  • Speaking of javaScript...

    ..though this is wrong in any language: var lastChar = str.charAt(emailStr.length - 1); if(!lastChar.match(/[^\.]/i)) { return false; } Rarely do I think " w... t... F???! , but this was one of those times. I guess if( str[str.length-1] == '.' ) return false; wouldn't be case insensitive...
    Posted to Forum by Zecc on 04-24-2008
  • Google ad representative line

    We were having problems on our site where ad positions would swap content. We still haven't figured out the problem but I did find this while digging through some of Google's JavaScript: function st(a) { return true; }
    Posted to Forum by steamer25 on 04-23-2008
  • Re: Lets count the WTF's here.

    Always fun to see someone trying to "protect" things using Javascript like this. document.write(unescape("protected" string here)). Yawn.
    Posted to Forum by lolwtf on 04-15-2008
  • Re: More outsourced madness

    [quote user="ActionMan"] Hasn't anyone heard of Prototype? It makes JavaScript 50 easy... var button = $('tdZipButton'); button && button.onclick = CheckZipClick; [/quote] I prefer jQuery . $('#tdZipButton').click(CheckZipClick) Although that's probably already...
    Posted to Forum by PhillS on 02-13-2008
  • Re: A very good spambot protection...

    It's valid JavaScript and Python too.
    Posted to Forum by Exteris on 01-13-2008
  • How to find 2 checkboxes on a web page

    That's easy... just look at EVERY element on the page and only do something if it's a checkbox. Heck, there's only 5000+ elements, how long could that possibly take? for (iCount=0;iCount<=document.all.length;iCount++) { elm = document.all[iCount]; if (elm.type == 'checkbox') { // snip } }
    Posted to Forum by chortlehoort on 01-09-2008
  • Re: IE stupidity

    I've had similar situations using javascript in IE, although mine were related to drawing and filling in lots of divs at page load time. Adding alerts at key places in the code mysteriously fixed it in IE. A collection of similar problems of this nature led to my theory was that the javascript code was...
    Posted to Forum by Nether on 12-11-2007
  • Re: Worse Than Failure Questionnaire WTF?

    capnPedro: Yeah, and then i disabled JS and actually selected it. That's what you get for client side verification! I did that too. I hope client-side verification only was intentional.
    Posted to Forum by FraGag on 12-03-2007
  • Re: Random Button

    Being very impatience and bored, I decided to implement this random function myself, in JavaScript no less (as I don't have access to a PHP-server). You can find it at the following location: http://home.lyse.net/aadnk/Redirect/WTF.html Enjoy!
    Posted to Forum by Mr. Lurker on 11-20-2007
  • Re: They can't force me to use Java

    luketheduke: PS: what language did he write the code generator in? You're not telling me XSLT is the code generator. Now that would be a WTF maybe.. I once had the idea to write an XSLT to JavaScript+DOM compiler... in XSLT.
    Posted to Forum by iwpg on 09-19-2007
Page 1 of 4 (36 items) 1 2 3 4 Next >
Powered by Community Server (Non-Commercial Edition), by Telligent Systems