dans.blog


The miscellaneous ramblings and thoughts of Dan G. Switzer, II

qForms Build 139 Released!

I've had a couple reports of issues or requests to make a few changes, so I've gone ahead and made them. One of the semi-big additions is a validation module that will give you the exact same functionality that's in CFFORM. Rest assured, I've made the same changes in v2. Anyway, here's the latest build:

[-] Change the _q_checkForErrors() function so that the call
    to the isNotEmpty() method used escaped double quotes
    instead of single quotes. This should allow single quotes
    in the description property.
[*] Changed the validateNumeric method to use the parseFloat()
    function to check for a valid numeric value.
[+] Added validateSame validation method
[+] Added validateInteger validation method
[-] Used my old homegrown compression routine on the compressed files.
    It doesn't compress the files down as much as either jsCruncher Pro
    or w3compiler, but it shouldn't break the source code either.
[+] Added cfform.js validation module. This should give you all of the
    exact same functionality as provided w/CFFORM.

As always, you can download the latest version of qForms from http://www.pengoworks.com/qforms/download/.


Microsoft Offering Security Bulletins RSS Feed...

I just noticed that Microsoft is now providing Security Bulletins in a new RSS feed.

Since I use my RSS reader just about daily, this seems like a great way to stay up-to-date on new Security Bulletins. Microsoft is also offering a number of other RSS feeds you can monitor. I'll also be monitoring the Microsoft SQL Server RSS Feed.


Mozilla v0.9 Released!!!

Firefox v0.9 has just been released. The Release Candidate (RC) was just released on the 10th, so I suspect the RC they felt was pretty stable. Anyway, here's a peak at what's new:

  • Extension Manager
  • Theme Manager
  • Data Migration/Import
  • New Visual Theme
  • Better Bookmarks
  • Better Search
  • Smaller Download
  • Online Help

I'm in the process of installing v0.9 as I type this. Hopefully all my extensions continue to work. I really love Firefox—it's become my primary browser, and I was beginning to think I'd be using IE forever.

more…


qForms Build 138 Released!

Well, since v2 is taking longer than planned, I'm releasing build 138. There's a few fixes that I've made and I've added a couple of useful properties. The highlight of this build is that you can now toggle off validation for a form by setting the qForm object's _skipValidation property to true, the validation rules will be ignored. This will be useful for those users looking for a way to "Save & Exit" from a form, without applying the validation rules. Here's a list of what's changed:

[-] Fixed a bug in the is/validateFormat() method which affected masks
    which contained 3 or fewer characters.
[-] Fixed bug in Opera v7.x where single checkbox elements where not
    working w/the setValue()/getValue() methods. I had fixed this in
    the v2 builds already.
[-] Fixed bug w/validateLengthGT and LT if the value was equal to
    the specified argument than no error was thrown (and it should
    be).
[+] Added qFormAPI.styleAttribute which allows you to specify a single
    property to apply a style change to. This defaults to "backgroundColor".
    This provides a quick CSS hack until v2 is released. If you change
    the qFormAPI.errorColor to a valid CSS property value you can do
    more than change the color. For example:
	qFormAPI.styleAttribute = "border";
	qFormAPI.errorColor = "1px dotted red";

    NOTE: This is experimental at best, you need test in different
          browser.

[+] Added obj._skipValidation property which allows you to toggle
    validation off/on for an entire form. Setting the property to
    true will cause the validation routines to be skipped for that
    form object.
[+] Added the validation_addon.js library. At this point, this contains
    one additional validation method called validateAtLeastOne(), which
    you can use to confirm that at least one field out of a list of
    fields contain a value.

As always, you can download the latest version of qForms from http://www.pengoworks.com/qforms/download/.


Mozilla Firefox Extensions Every Developer Needs!!!

Ok, I thought I'd compile a little list of Firefox extensions that are useful for any web developer (and a few that are good for any user of Firefox.) For those of you who read my blog, you'll know that I've switched to Firefox as my primary browser—it's just fantastic. Anyway, here's a list of the extensions you shouldn't be without.

General Extensions (Stuff For Everyone)

  • Tabbrowser Extensions
    This might be the best of the extensions as it makes Firefox and Mozilla's tab interface work the way it should work out of the box. First, it adds the ability to re-order the tabs by dragging and dropping the tabs. Oddly enough, I find myself re-ordering tabs quite a bit. Next, it will remember all your open tabs when you close Firefox and will automatically re-open them. I love this feature, since there are 3 or 4 sites I tend to have open all the time. Also, if you ever need to reboot while you have a ton of tabs open, you don't have to worry about trying to restore all your windows after reboot—just close Firefox and reboot your PC. The last feature I'm highlighting is you can configure the extension to open all "new window" links into a new tab instead. This extension does more than what I've highlighted, but these are the key features that make it a must download.
  • Bookmarks Synchronizer
    Allows you to synchronize your Firefox bookmarks among different installations of Firefox. I use it to keep my laptop and desktop in sync.
  • RSS Reader Panel
    This extension adds an RSS Panel to Firefox. Just set up a bookmark folder containing links and folders to all your favorite RSS URIs, and hit [ALT]+[R] to bring up the RSS Panel. The panel is split into two sections. The upper section shows the RSS feeds and the lower section shows the snippets from the RSS feed. Click on the headings in the lower section to bring up the actual RSS entry.

more…


XForms: Dubinko's Response To Hickson

Micah Dubinko has posted a response to the Ian Hickson's comments about the future of XForms. Micah says Ian "swings and misses", but I think that's more accurate of Micah's post than of Ians.

Dubinko has done a ton of great work and I admire what he's put together with XForms, but I just don't think his response does anything to discredit what Ian had to say. Until there's a large outcry from developers to support XForms, there's going to be no effort made to integrate within the browsers. I know there's a few diehard XForms fan, but we're a long ways away from the mass of developers being ready to use and understand XForms.

One point I really disagree with Micah on is the trusting of XForms to do server-side validation. There's no way using HTTP that I place any trust in an response received from the client. It's way to easy for someone to arbitrarily change the rules of the XForm when they submit the document back to the client. You really still need to do something on the server end of things to verify the "signature" of the XForms. After verifying the signature of the document, you'd still need to re-validate the data in the form. So, it's not as simple as he stated in his response.

more…


ECMAScript Announces Native XML Scripting (E4X)

This piece of news seems to have gone largely unnoticed by the community—so thanks to Colin Moock for pointing it out. ECMA has announced, that a new extension for the 4th generation of ECMAScript has been agreed upon. The new standard, E4X (or ECMAScript for XML) will standardarized, vendor-neutral programming syntax for adding native XML support to the ECMAScript language.

I was pretty excited when I first read this news, but after reading the article by John Schneider, I'm not so sure I'm found of the idea. I think I like the idea of a generic DOM model much better. The new syntax looks clunky to me and doesn't feel like a natural extension to ECMAScript (which what JavaScript has become.) John claims the code is "simpler, more compact, and more familiar to the average programmer..." I don't know that I agree with that. It looks like a pretty strange, foreign syntax to me. However, that example may not be good example. I look forward to seeing more on this. Lord know I'd love the browsers to come up w/a standardized XML DOM API.


Jason Radosevich on qForms...

Jason, over at Terminal Fusion, has blogged some comments about qForms. Always keeping an eye out for what people have to say about qForms—good or bad.


Fix Internet Explorer CSS/Compliance With A Behavior!!!

Ironically enough, I was on Dean Edwards' site a couple of nights ago and completely missed this. Dean Edwards' has put together a neat little behavior for IE which attempt to correct IE's support for CSS2, called IE7.

The idea behind this behavior is that you can use IE's ability to dynamically alter a stylesheet in order to correctly display CSS statement currently not support by IE5+. It does this by changing the CSS statements to styles that IE does support and that will mimic the correct CSS behavior as per the W3C spec. This behavior will also attempt to correct a few other issues IE has with compliancy—such as PNG transparency. Make sure to check out his list of compatibility fixes.

It's a pretty cool idea that could help developers start writing W3C compliant code. I've been developing websites professionally since 1995 and always trying to hack code in order for it display correctly has gotten very old. Anyway, go applaud Dean and his affords.


Future of XForms In Mozilla/Opera...

I was reading the XForms Mailing List this morning and came across a message which pointed to a post on gmane.comp.mozilla.devel.layout newsgroup about the future of XForms and Mozilla.

The author of the newsgroup post, Ian Hickson, also works full time for Opera Software—the maker of the Opera Browser—so I'd imagine Opera shares a similiar path as Mozilla. Here's my favorite quote from the post:

> so I just don't buy that its so complex that that our weary little
> brains will melt.

Many authors I have spoken to disagree. The entire concept that your form controls aren't what gets submitted is very difficult for many people to understand. You have to realise that for many people, even the concept of CSS is hard to understand. People ask "how do I make this text blue", not "how do I make all my headers blue". The former is answered by the WYSIWYG mentality, stick in a <font>. The latter is answered by the semantic/style divide mentality, mark up the text as being a header, then add a rule to your stylesheet that maps headers to a colour.

In XForms the problem is even worse -- "how do I disable this control?" has the answer "you tell your data model that the relevant subtree is no longer relevant, then you bind your subtree to the control". People's brains dont melt -- they just go elsewhere.

more…


Mandatory Browser Extensions For All Web Developers

Ok, two blogs in a row—both courtesy of Rob. I was browsing through his archieves and found an entry about a cool extension for Firefox/Mozilla that does all sorts of really cool stuff for Web Developers. I can think of a number of times when a tool like this would have been useful in the past. Unfortunately, there's been an IE tool that's similiar that I never knew about. Geez! Anyway, check out the following tools that should be useful to any web developer.

Firefox/Mozilla Web Developer Extension
Bookmarklets and other useful things for IE's Links bar


Problem w/Mach-II & qForms when debugging...

Rob Brooks-Bilson blogged about an issue he's seen when using qForms with Mach-II. Seems that Mach-II stores all it's generated content in a variable called "Request.content." However, when running in Debug mode, the Request.content code gets outputted a second time, thus causing errors in your template because of the duplicate output.

I'll try playing around w/the code to see if I can stop qForms from throwing a fit, but this is really more of a problem with the debug templates. I normally edit CF's debug templates to make sure that output is wrap in the htmlCodeFortmat() function—that way I see actual value of the string—and not what it's rendering. One of the comments on Rob's blog also mentions this point.


qForms v2.0 Preview Online...

Ok, I finally got the qForms v2.0 Preview uploaded. I had some problems with Camtasia on my laptop—the recording was fine, but I couldn't export to SWF—I finally got things working by installing Camtasia on one of my desktops. Here's a quick rundown on some of the things you'll see in the preview:

New Features

  • Support for internationalization (i18n.) The window.$language variable will allow you define a language pack to load.
  • Better support for add-on modules. The API has been re-written to easily allow add-on mods to the library. The previous version did a great job on allow allowing new validation method to be quickly added and to add custom functions, but it took a little too much work to change the default behavior or to add your own event hooks.
  • You can now overwrite the default methods used to output errors to the screen. The sample addon/dhtml mod shows an example of this.
  • Lots of new methods--such as the setMaxLength() method which can be used to automatically forward the user to another field after X number of characters are entered. This is great for times when you went to split input between multiple fields (such as the case in phone numbers, ssn, serial numbers, etc.)
  • You can now set dynamic masking for a field. When filling out fields such as phone numbers and ssn, masks can be applied to the field and qForms will automatically filter out invalid keystrokes and insert the required mask characters where appropriate.
  • A new "Group" object has been added. Groups allow you to take multiple fields and treat them as one. This feature will often be used in conjunction with the setMaxLength() method in order to break up a particular value into multiple fields.
  • The ability to delete validation rules from the queue on-the-fly.
  • Disable/enable validation for the entire form.
  • Much, much more.

more…


qForms v2.0 Demo Coming...

Ok, one of the most common question I've been asked over the past couple of years is "When's the next version of qForms coming out?" Well, I still don't have a definitive answer for that, but I am working on it in my free time. Since I know that isn't very helpful, one thing I thought might be helpful is put up a working demo. I'm wrapping up the demo and it should be posted in the next 24 hours, so be sure to check back soon!


Disabling Auto-Complete For Certain Fields

Have you ever wanted to turn off Internet Explorer's "auto-complete" feature for a specific form field? Well, there's a lesser known, IE-specific, attribute named "autocomplete" for the <input> tag which will disable the auto-complete drop down box from appearing. Why would you want to do that, well there's lots of reasons. Maybe your creating a site geared towards public computers that allow a user logon; in that case, you don't want user names appearing in the autocomplete box.

To disable the auto-complete feature, just add the "autocomplete" attribute to your form field tags with the value of "off". For example:

<input type="text" name="userId" autocomplete="off" />

more…