'JavaScript Code' Category

January 12th, 2007

A very fast way to validate a form with JavaScript

There are many universal form validation functions out there. But I created this very quick function to very easily check for input, without modifying your form fields in any way, and without have to check each field individually. The script just checks for a value, it doesn't validate the format (like an email address), because [...]

January 5th, 2007

Check IP format with Regular Expressions in JavaScript

Here's a quick JavaScript function to check that a user has entered a valid IP address. Don't ask me why, but there may be times when you need a user to input an IP address, rather than just grab theirs. And it's always easier to check first on the client side with JavaScript than having [...]

December 21st, 2006

Google Maps causes Internet Explorer to crash

I was working on a site the other day, and I came across the error on a page that I've never seen before. The page had an embedded Google Map, and there was a JavaScript function to display the map. The page worked in FireFox, but when I ran it in IE, I got the [...]

November 3rd, 2006

How to load XML data with JavaScript (AJAX tutorial)

The latest technology (or grouping of technologies) sweeping the web is AJAX (Asynchronous JavaScript And XML). This technology, using the XMLHttpRequest() object to retrieve a piece of XML in the background, and load its contents into the web page dynamically, thus creating a constantly refreshed Dynamic HTML (DHTML) interface.
You can make very complication AJAX [...]

October 18th, 2006

AJAX and XML

Lately I've become obsessed with realtime updates to pages via AJAX & XML. I've been drafting a simple solution, and will be posting it shortly. Stay tuned!
ps – If I get enough AJAX related code, I'll create a new category

« Previous PageNext Page »