From time to time I've seen people complain about how boring and unflexible HTML forms are in terms of looks. Some of the designers I've talked to really hate the default button elements, especially when it comes to the radio and checkbox elements.
I was doing some surfing last week and came across some example code on Eric Dolecki's blog which he labelled CSS Radio Buttons. Essentially he was using some JavaScript to hide the default input elements and replace them with images. The code was pretty neat, but a little cumbersome and involves having to add a lot of hooks. So, I spent a couple of hours over the weekend and through together a very rudimentary "Skins" plug-in for qForms.
I've only tested the code in Firefox and IE at the moment, but it seems to work pretty well. In order to see the full effect, your browser will have to support the insertBefore() method. Essentially what the code does is parses through the field elements in a form looking for the type of element you're skinning (currently only checkboxes and radio elements are support.) It'll then hide the element by setting the display property to "none". It'll then insert an image into the DOM right before the input element which has event's attached to the onclick event which will replicate the input element's functionality.
I installed the Eclipse DBEdit Plug-in today in order to try to save some development time. The plug-in looks pretty cool, but took some time to install. I first tried to see if I could use the Macromedia JDBC drivers that were on my box, since I already have CFMX 7 installed. Turns out you get an "Restricted Access" message when trying to use the Macromedia drivers when you're not using a Macromedia product. This lead me to installing the Microsoft SQL Server JDBC drivers.
Here's what I had to do to get DBEdit installed. I think many good open source projects go unused because often there's a complete lack of instructions for getting the project installed and getting it operational. So if you're using SQL Server 2000 and Eclipse and want to get DBEdit running, you've come to the right place!
NOTE:If using WinRAR, you should be able to open up "mssqlserver.tar" and then open up the "msjdbc.tar" and browse to the "./lib" folder without extracting all the .tar files.
NOTE:If you want to specify database other than the default database for the user you're logging into, you can specify the database to log into by default, by adding the databaseName argument to the URL string. (Where XXX is the name of the database.)
jdbc:microsoft:sqlserver://127.0.0.1:1433;databaseName=XXXX
Ever had an e-mail address that keeps popping up in your autocomplete field in Thunderbird? If you've used other e-mail clients in the past, usually you can select the entry using the keyboard and hit either [DELETE] ( or [SHIFT]+[DELETE] like you can in Firefox.)
Apparently Thunderbird compiles the autocomplete list not from a cache, but from e-mail addresses in your Address Book or by guessing for users in your domain. So why is that rogue invalid entry in there you ask? Well, perhaps it was added to your Address Book automatically under the "Collected Addresses" section. That's what happened to me.
All of the sudden a name started appearing in the drop down list that was invalid. It was causing me problems because it was always popping up as the first choice when trying to e-mail my boss. So, if you're seeing some invalid e-mail addresses showing up in your autocomplete list in Thunderbird, do the following:
The Mozilla group has released Thunderbird v1.0.5. This release is supposed to fix some stability issues and it also addresses a number of security issues.
The Mozilla group has released Firefox v1.0.5. This release is supposed to fix some stability issues (I've had Firefox crashing on occasion for me when opening a pop-up window, but I think this may be related to an Extension I have installed) and it also addresses a number of security issues.
I'm really digging Eclipse. There's very little I don't like about v3.1—about the only thing I don't like out of the box is the Find/Replace dialog box. I'd like to see something a little more like HomeSite+ Extended Find/Replace dialog box. The good news is, I'm sure I can probably find a plug-in that will do pretty much what I want.
Anyway, what I'm really digging is Subclipse, which is a SVN plug-in for Eclipse that plugs right in to the "Team" context menu. The one thing I didn't like about Subclipse out of the box was it's re-labelling in my Navigation Pane. It adds a bunch of information that some users will probably want (last user to edit a file, date/time it was edited, etc) but I really don't generally care. If I do, I can just view the document in the Resouce History pane and I'll get all the details I want about the file.
Fortunately, Subclipse allows you to edit the labelling. I really like the way TortoiseSVN labels things in Windows Explorer, so I set up Subeclipse to basic emulate that labelling (while as close as you can with just text.) Anyway, here's a screenshot of my setup:
The buzzword "AJAX" is becoming all the rage these days. While the concept surely isn't new, the method of delivery has changed. A comment by Oguz Demirkapi over on Mark Kruger's "Client Side and Server Side Validation - a case for both" blog post got me thinking about AJAX and qForms. Oguz said:
and we use also Ajax for server side checks. As an example: while registering for our website our Ajax code check whether entered e-mail address has already been in database or not. And than show error msg directly as client side action.
It is a really great option to check availibility etc.
With all the changes I've made to qForms, I figured it would be pretty easy to throw together a little example form that used AJAX techniques to validate a field against live server data. Instead of using a validation method, were instead going to check the value onblur (so that we can then query the server while the user is interacting with the rest of the form) and then we'll display an error is the user has selected a user name that's already being used.
After watching Rob Rohan's CFEclipse Intro Videos, I decided to give Eclipse another go around. I've played around w/Eclipse several times before, but I've always gone back to HomeSite+. Rob's video showed me a few key features (such as the Bookmarks and To-Do list) that are very intriguing to me. Following Rob's directions, install was simple and I was up and runing within minutes of downloading Eclipse.
One thing I ran into though, is I wanted to hide my .svn and .project entries from showing up in my Navigation bar. In order to hide those files/folders from showing up, you need to turn on the ".*" filter. Here are step-by-step instructions for turning on that filter.
Last night I was thinking about the changes I had made to the createDependencyTo() method and started thinking that there might be times when you'd want to do something similiar, but instead of having one field affect another in some manor you'd define a rule for a field if it meets a given condition.
My basic thought would be to add a new method you could call. I've been tossing around the idea of setActionRule(), setConditionAction() or setConditionalRule(). Something along those lines. The idea would be that if the value of the field this method was attached to equal a condition supplied, a function would be triggered.
When I was looking through my demo templates, I came across an example that showed some features in qForms v2.0 that I had forgotten I implemented, but it's something that's very cool and provides a lot of flexibility. What is this code you ask? Well, it deals with the createDepedencyTo() method.
For those of you who aren't familiar with this method, in a nutshell the createDependencyTo() method is used to build rule logic into your forms. For example, maybe you only want to require a user to enter their e-mail address if they've actually selected to have something e-mailed to them. You could do that like this:
oForm.email.createDependencyTo("EmailNewsletter", "yes");
I was doing some surfing today and came across a cool effect on the w3compliler Contact Us form. When you're focused on a form field, the field's label style will change to give you a better visual representation of where you're at on the form. I thought to myself, that's pretty cool--I bet I can do that with just a coupe of lines of code in qForms v2.
In the w3compiler Contact Form, they're using tables to layout the form, but I wanted to do something using strictly CSS and HTML. So I decided to use the actual <label> tag as the field label—this allows you to click on the label to set the focus to the form field. Check out my version:
Ok, here's some live demos of the qForms. If you attempt to download the source and use it in a project, you're using it at your own risk—your on your own.
http://www.pengoworks.com/qforms/v2/demo/
I'll try to keep this fairly up-to-date w/what's going on with the source code, especially if more demos are put together.
I sent this letter to the qForms Mailing List earlier and figured I'd better post it here. Leave me a comment if you're interested in helping with development.
I know many of you have been waiting a long time for news on v2. Believe it or not, it does actually exist. The reason why it's been in sort of permanent hiatus was because I really wasn't doing any work that corresponded w/furthering the development.
qForms v2 is like 95% complete, and has been, for a long time. There have been a few key features I just have never had the time to sit down and really figure out. The key features I wanted to introduce for rev 2 that aren't done to my satisfaction yet are:
- Applying validation rules to a qGroups (a qGroup is a group of fields that work as a single field. Picture splitting a phone number into separate fields for area code, prefix, suffix, etc and being able to use getValue()/setValue() to retrieve the values of all the fields as one string.)
- Event queuing. One of the things I want to do is get it to the point where you can safely write add-on hooks w/out fear of them interfering w/other add-ons you must load. This still needs improvement.
- Masking—still needs some improvements. I've re-written the code from scratch several times.
There are other things that can probably be done to improve things and I think the project really needs some new energy as I think that will help re-spark my energy for the project.
So, where am I going w/all this? Well, last night I submitted a new project request at Tigris.org. I'm hoping that those guys will approve the project soon (or I'll be looking for a new SVN home.)
What's this mean? Well, I'm planning on opening up the SVN repository for open development. Instead of opening the floodgates and letting everyone have access to the SVN repository, I'd prefer to have some volunteers from some of you who are willing to help out on the project.
So, I'm looking for experience JS programmers who have some experience w/Subversion (that's the source control I'm using) and who would like to help out on the qForms project.
As soon as the guys at Tigris approve the project, the URL for qForms SVN will be:
For those of you not interested in following the actual day-to-day things, keep going to www.pengoworks.com/qforms for updates. However, if you're always interested in playing around w/the latest and possibly unstable builds, that's the place to go.
I'm also going to be posting the language files there (as qForms v2 supports internationalization.)
For those of who never saw it or what to see it again, you can view a preview of qForms v2 at:
http://www.pengoworks.com/qforms/preview/
Here's a brief list of what I have added:
- Internationalization
- Auto tabbing (via the setMaxLenght() method)
- Remove validation rules on-the-fly
- Keystroke dynamic masking
- Disable/Enable validation rules per form
- Much more customizable. (See the preview for how you can replace the default alert() handlers and drive everything via DHTML.)
-Dan
Ok, so it's been a while since I've blogged anything useful—so I figure it's about time I do!
I've been using Thunderbird as my primary e-mail client for my new job. I figured I'd try making the switch away from Outlook to see how it goes. Overall there are a lot of things I really like about Thunderbird. It's definitely faster than Outlook and creating/sending e-mails definitely seems quicker. There are things I miss from Outlook—mainly the complete integration between tasks & e-mail. I've been using the Mozilla Calender project, but I'd like to see all the pieces integrated.
However, the biggest problem I've always had in every e-mail client I've used is that I hate, and I mean hate, HTML e-mail. I find it cumbersome and it's usually harder to read. It seems like everytime I get an e-mail in HTML there are several different fonts. I rarely get an HTML e-mail from someone that actually looks elegant. I also find creating inline responses (which is my preference) is much cleaner and easier to follow when done in Plain Text. That's why I always use Plain Text as my default send method.
I was watching a re-run of The Screen Savers today and they had a guest on who showed off a browser toolbar addon called SpoofStick.
The idea behind this toolbar is that it will resolve the actual website you're on and display the name of the server. Some of you may be thinking: "Why is this useful? When I go to a site I know what site I'm on." Or do you?
One of the most commonly used techniques by hackers attempting to gather person information about users (such as your credit card number or PayPal account,) is to send an e-mail address that looks official which provides a link to "update your personal information." These messages often look legit and the websites they take you too often look they way you'd expect them to—however, they're not actually the official website; it's a copy of the site on a hacker controlled server.