Thanks for visiting! We would like to serve you better. Please subscribe to our RSS feed for daily updates. This blog posts regular Wordpress news, updates of themes, plugins, ideas, hacks, quick fixes and everything about blogging, especially about Wordpress. You can also receive updates from this blog via email if you want that method of notification.
I ran into some trouble with the forms validation because I was using a javascript:document.formname.submit() which would require a name for the form. As it turns out, form name is deprecated in XHTML 1.0 Strict and XHTML 1.1.
In other words <form name="blah" ... > is not valid in XHTML 1.0 Strict and XHTML 1.1.
To get around this issue, I used <form id="blah" ... > and in my link I used javascript:document.forms['blah'].submit(); which validates correctly.
Also, to get around the carriage return problem in input tags of forms (for input tags to validate correctly in XHTML 1.0 Strict and XHTML 1.1, they have to surrounded by <p> or h1 etc. ) I surrounded my inputs by (gasp) fieldsets and then hid it by styling the fieldset so I could get them all in one line. Im sure a lot of people know about these already, but this is for my future reference.
Following up on an old article form Jesse Ruderman I wanted to have a way from within WordPress to validate XHTML through the Quicktags buttons. I rewrote the “Bloggidate” set of hacks to work from within WordPress.
So this will let you validate the content of your post before you actually post it to the blog to ensure things do not ever break in terms of validation. Just type in the post and click on validate from the quicktags.
The installation is relatively simple and I have included functions for both XHTML 1.0 Transitional and XHTML 1.0 Strict.
You can download the instructions from here:
http://weblogtoolscollection.com/b2-img/validatexhtml.txt
PS: Tested and working in both FF and IE
Again, much of the code comes from Jesse Ruderman, so thanks go out to him.
In keeping with my previous post about promoting better programming/coding/markup/style practices among present developers and designers, I have decided to add a couple of categories to this blog and promise to add a few articles every week to those categories. XHTML syntax, better semantics, (common) validation issues and fixes for them, better explanation of validation errors are fair game. I invite my readers to contribute to this process as well and would appreciate a small post if and when you solve a complicated (or simple) validation issue for yourself.
On a similar note, I am still looking for more authors for this blog. WordPress people are, as always, more than welcome, but my focus is on getting some authors for other blog tools such as Drupal, MT, Bloxsom etc. If you would like to write (and conversely get exposure for your site/blog/tool) a couple of articles a month for weblogtoolscollection.com, please register and send me an email with the registration information so I can give you the proper permissions.
Upcoming (planned, or half written) articles in this series:
- Better Link Name Choices
- Validating Forms in XHTML 1.1 Strict
- “Script Language” Boo Boos