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/.
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.
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:
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.
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/.
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.
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.
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, 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.
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.
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.
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.
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.
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:
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!
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" />