- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I wonder when the next OMGWTF contest will take place.
I keep hoarding some good ideas.
Admin
Well, since you can hardly call Javascript "Software Development", I'm going to have to go with (d) A bunny rabbit!
Admin
JScript and JavaScript are both versions of ECMAScript, not one being a version of the other.
Admin
Amateurs! The right way to do it is to fire off an AJAX event. What are they stuck in, the 70s?
Admin
Admin
Admin
Reminds me of some Java code I had to maintain a while ago:
Admin
Admin
Sadly, I don't think Apple supports any of WebObjects anymore.
(Truth in proselytizing: Java Client / Direct to Java client worked well over an intranet, but badly over internet speeds. But it was fast to prototype.)
Admin
You can send JSON objects to the browser from any server side language using many third party libraries (on the server).
Sending JSON objects to the server and havinging them executed directly (using the execute method) would be a thermonuclear WTF.
Admin
I would like to take every person who ever made a page that "requires JavaScript", tie them to a telephone pole, and whip them mercilessly until they swear never again to go within 1000 feet of a computer as long as they live.
Developers of Flash-only sites, along with those who post PDF documents, will not get off so easily.
Admin
I'll stick with <noscript></noscript>. Thanks.
Admin
function canIPostAComment() { return true; }
function validateComment() { if(!canIPostAComment()) { location.href = 'no_comment.html'; } }
Admin
There's a lot about this web development stuff I don't know. Anyone willing to recommend a definitive book on this stuff?
Admin
Sorta reminds me of the original Apple LaserWriter. When you got it it came in a big cardboard box. Inside the big box was a smaller box. Inside th smaller box was a sheet of paper, explaining how to open the outer box.
Admin
Well.. it's JAVASHIT. It's the pure essence of facepalm. It's the refined way of saying "Aint me a cool jock wid mah commpyuta".
Admin
Admin
For all you youngsters out there, I can tell you that the point of SSJS WAS that it was there when (almost) nothing else was.
The Netscape Enterprise Server that came bundled with Informix Database was a very easy tool to use. ASP and JSP didn't exist yet, and PHP was just a toy for personal use.
(Take this from someone who started his career as coding SSJS applications for a couple of years from 1997 onwards)
Admin
Nope, yet again you guys have totally lost me in all your attempts to be more correct than each other, or to be 'first'.
As with the DB level validation the other day, the only WTF here is the implementation.
The basic idea is sound and works well with server side scripting and modern styling:
Sorry, you must have Javascript enabled
Feel free to hold a competition to see how many typos you can spot in the above ;-)
Admin
Not quite, because some idiot will turn off meta redirects in their browser "for security reasons". Yes, this still happens. Then they complain because they get a blank page.
As for ASP not being around in 1997, umm, yes it was. It was about 2 months old but still out there for those who wanted to use it (and had the money, yay for military research!), along with Microsoft certified courses. And PHP is still a toy, even after all this time.
Admin
Why the naked hostility? Sure, I get frustrated with web pages that have annoying and/or unnecessary requirements. But, you can do things with javascript that you can't do without it. Should nobody ever be able to do those things? When you're competing with desktop apps rather than static html pages, requiring javascript is not out of line.
Admin
Lost you enough that you didn't read the rest of the thread?
This was mentioned several times, the major problem is that it tends to flash the "Sorry..." message before hiding it.
Use <noscript>... really. This is exactly what it's designed for. There is no need to look for clever ways to solve this problem!
Admin
Sorry about the day long delay...
It's bulletproof because it will always properly detect that JavaScript is not available and show the proper message. Unless you work at it, there is no chance that the message will appear when JavaScript is available, and no chance that it will not appear when JavaScript is not available (except for the NoScript extension or similar which will let you know there is JavsScript there and being blocked itself).
Security and accessibility are entirely different issues, but we're only a) talking about sites which, for whatever reason, require JavaScript and b) not talking about actually securing information... just about detecting a particular state.
Admin
In BeOS, is_computer_on() was a system call that returned a constant integer. It was used to measure system call performance in the "best case." is_computer_on_fire() was later added to return a floating point number, to measure best-case system call performance with floating point number return values.
Admin
Well, except that that doesn't validate.
If you really must redirect non-javascript users, you're going to have trouble because the only ways to redirect are server-side, via <meta> or with Javascript. You obviously can't do the last one, and the other two basically require server-side preparation (and since browsers don't tell you whether Javascript is enabled, you're screwed there).
I think the best option is to put a notification message in <noscript> tags. If you don't want to give your users access to you content if they don't have Javascript enabled, then you can hide your content via CSS and show it with Javascript. Not pretty, but it works and it validates.
Admin
I can see we have people here who don't realize JavaScript is a fine scripting language (and some people who seem to think it's related to Java). Unfortunately most developers simply are not familiar with it but have a strong opinion about it anyway, it is (still) widely misunderstood.
JavaScript is not just a copy+paste language to fudge form interactions in, it's a sophisticated object oriented programming language you can develop rich dynamic interfaces in (especially with Canvas support). It also makes for a perfectly good server side scripting language, especially if your requirements are modest.
Implementations of both JavaScript (as seen in WebKit and SpiderMonkey) and JScript (as seen in MSIE) make working with multi-dimensional arrays are a joy, they have try/catch support, good XML support for DOM manipulation and they interoperate well with server side HTTP services (with third party library support for interfaces like Document/Literal SOAP services).
Most implementations have a few significant limitations, but in a number of ways it is more elegant than many other scripting languages.
I'm not sure why people are fretting about whether things should be 'server side' or 'client side' - if you build the underlying web service first (with consideration for things like bubbling up errors) that should be straightforward. As always trying to implement a client/server model without a solid interface design up front will get you in a horrible unmentionable mess though (that happens a lot on the server side of many websites as it is).
Admin
And what exactly makes you think that the makers of email client software might have access to someone's ISP in order to get the password that they've asked to have mailed back to an email account they can't check?
In these emails to our support group, they asked that we email their password to them at the address they emailing from. They want us to hit 'reply', in other words. We're supposed to get their password and send it someplace they can't access. Get it?
Admin
Hooray! My first time a dailywtf code snippet went by and I got the joke!!
Admin
If you really must redirect non-javascript users, you're going to have tremendous trouble because that web application is plain BS. And therefore its the least of your problems, wether that syntax does w3c validate or does not.
JS needs always to be used ONLY as to enrich user experience ADDITIONALLY.
Fuc# JS-fanboys: That noobs force me to headtable x times a day.
Admin
if (!computerIsOn()) { document.write("This should never happen!."); }
Admin
I thought Brainfuck.NET was already taking it too far.
Admin
Not that that means you can actually get the password. =)
Admin
If i was still using MSN it would 2022 where i live. 46 minutes to transfer 972kb of photos.
Admin
Hmmm
"headtable"
If only that was a standard part of HTML, a regular element in the DOM that could then be manipulated by Javascript!
:)
Admin
Another non-coder discovering what they're not good at. Hope his next career path is slightly more appropriate for him.
Admin
This.
The first one.
CAPTCHA: plaga.
Admin
Schrödinger to Cat: "Are you alive, cat?" Cat: "No!"
Admin
Translated to english, this would be:
"I don't think, therefore I am not."
Admin
A while back I asked my ISP to upgrade me to a JSP-enabled server. To tell when they had gotten it done, I wrote this little program:
Note that on a non-JSP site, all the JSP is just invalid tags that are ignored, so it displays "We can't JSP." On a JSP-enabled site, the JSP is executed, etc.
I was rather excessively proud of myself for coming up with this simple, cute solution.
Admin
I once saw an add for a program that would automatically translate C code to COBOL. My second thought was to wonder how such a program would work. There are a lot of features in C that would be difficult to reproduce in COBOL. My first thought was to wonder why in the world anyone would want to migrate from C to COBOL. That's like ... like ... selling instructions on how to convert your electric lights to burn whale oil.
Admin
"We have a public site that requires JavaScript be enabled"
That's "the real WTF" right there. An appallingly common WTF, but a WTF nonetheless.
Admin
Wow, that's cool.
That's inspired me to write a universal cross-platform API that I'd like to implement into every IDE and code editing app/widget.
So now with this only competent programmers can use IDE's, anyone else that tries to use it will get the error message depending on which language they use, or they'll get the endless loop message if they use it wrong.
I could probably evolve it to support .NET and other languages, but I'd have to use some inline assembler code as per http://thedailywtf.com/Articles/Code-Ownership-Gone-Awry.aspx
Admin
That code is actually wrong. I just submitted a comment to that Easter egg site. is_computer_on() returns int32 (bool) and is_computer_on_fire() returns double. The calls aren't as silly as most people seem to think. They're used for getting benchmarks of the syscall interface that are more accurate than using getpid (Linux's fastest syscall).
Admin
Thanks!!! This reference helped :)