JavaScript Frustration

I’m a web developer by hobby (and soon to be by profession, again), JavaScript is arguably the most common, easiest, and simplest “quick and dirty” way to make your web pages dynamic.

So, let’s say you want to modify your form’s “Reset” button from its default behavior, and add a dialog that basically says “Are you sure you want to clear your form and start over?” Well, that’s easy enough, right?
var return_value = confirm(“Are you sure you want to clear your form and start over?”); The return values are easily handled: true or false.

But the buttons… [ OK ] [ CANCEL ]. That’s not what I asked! My answers should be [ Yes ] [ No ], shouldn’t they?

Well, you’re asking a CONFIRMation type question, and sometimes YES/NO, RIGHT/WRONG, MORE/LESS, UP/DOWN, NEXT/PREVIOUS are the answers that would best fit your question, but how do you modify the buttons of the CONFIRM() function? Simply, you can’t.

So what are our options? Well, VBscript (and to an extent Jscript) will let you do this, but those are only a MSIE solution. You spawn a popup (and have to deal with popup blockers and properly passing values between browser windows). You could unhide a hidden [div] containing the CONFIRM question and answers in a layer with a higher z-index. Hey, why not make an interim page storing all your submit data between full-browser pages? The most creative solution I’ve seen was a professor at Weber State University who quickly compiled a Japplet and used it to pass parameters from the html form to the applet to the JavaScript.

:: Sigh ::

Anyone have any more elegant (client-side) solutions?

Project "Vista Tablet": Part 3 of 3 (Software)

Windows Vista is the version of Windows to follow Windows XP. It’s due out in 3Q 2006 and should be the biggest leap in “enhancements” since the jump from Windows 3.x to Windows 95.

At the time of this writing, Vista is in Beta 1 but has released some “previews” of what Beta 2 will become. The version available at the beginning of this expirament was CTP build 5219 “based on code which will become beta 2.”

The installer is powerful, yet surprisingly simple. No more do you need to disconnect your card reader, Zip drive, extra optical drives, and external hard drives to avoid Windows being installed to drive G:\, it’s smart enough to make your hard drive C:\, like it’s supposed to. Partioning and formatting your partition is surprisingly simple, dare I say “elegant?”

The installer is now substantially more simplified, but the “finalizing” process takes far too long (and doesn’t give you a time estimate: my P4 3.0 took ~6 hours to finish this, my PM 1.4 took about 2 hours).

After that the majority of my devices worked out of the shoot. Exceptions include my tablet’s buttons (including the “auto-rotate” switch), the touch-pad’s scroll toggle, and the RealTek(?) integrated modem. I can live without those in the short-term.

Vista (in the 5219 build) differs from the Windows XP “selling points” of “no need to teach it how to recognize your handwriting, it just does it.” That was plain stupid. Here you’ve got a device capable of adapting to your writing style (no, not based on a training model like voice recognition, but based on usage, and corrections) and what do you do? You turn it off in the name of marketing. Smart.

True, the recognition was decent (almost on par with Apple’s ill-fated Newton — in its last incarnations before Steve Jobs neutered then killed it), but it didn’t get any better. In Vista, not only does it appear to “learn” from you, you can also train it to recognize your style of writing. Full circle, I suppose.

Microsoft didn’t stop there, now the stylus isn’t just another mouse pointer, as it was in the original and SP2 Tablet PC releases, it actually functions like you’d expect a stylus to interact with the OS. Simple things like screen taps, double-tabs, tap-and-hold (similar to right-clicking), etc. The text-input-panel (TIP, the panel that allows you to input recognized text into text fields of “stupid” (read: non-ink-enabled) applications) now slides off and onto the screen (not quite as one would expect, yet) rather than being placed as a non-standard toolbar on the Windows Task Bar.

Gestures are now supported natively. You can flick your styles one direction to scroll up, another to scroll down, another to copy, another to paste, yadda yadda. Though I haven’t used this (other than the “scratch out” gesture) on the tablet pc, I used them frequently on my Pocket PCs and moreso on my Newtons. The move to gestures (or “flicks”) is both difficult to “get right” from the aspect of implimentation, but also indicative of the maturity of the operating system as a truely pen-enabled environment.

On some non-Tablet-centric notes, Glass is very cool, with transparency being utilized more in the new UI, again, this requires some finesse to “get right” and Glass isn’t quite there yet, but the potential is, and so is the foundation.

Other pillers expected to be in the upcoming release of Vista were either not present or not fully implimented, and stability was an issue.

That said, for being a “pre-beta 2, community technology preview,” the resulting product was nothing short of amazing. Most OS betas don’t last more than a day or so on any of my “daily use” systems, this one lasted a full week under normal load before the lags, reboots, and frustrations became higher than I could effectively deal with. You might read that in a negative way, but it’s the opposite, it’s a VERY positive thing, lasting 5 times longer than most.

Stay tuned to the MSDN blogs on Tablet PCs and Windows Vista… I’m sure you’ll be impressed!

What's your IQ?

Via The Classic IQ Test, my IQ score is 122.

“This number is based on a scientific formula that compares how many questions you answered correctly on the Classic IQ Test relative to others.

“Your Intellectual Type is Word Warrior. This means you have exceptional verbal skills. You can easily make sense of complex issues and take an unusually creative approach to solving problems. Your strengths also make you a visionary. Even without trying you’re able to come up with lots of new and creative ideas…”

(Just be aware, this “free test” will most likely send you a bunch of spam email if you give them your real email address.)

Get Adobe Flash playerPlugin by wpburn.com wordpress themes