-
Checking availability of user name with AJAX

Lately I’ve been writing quite much about AJAX, but it is so useful that I’m sure it is of everyone’s interest!
In this post I will show you – as the post title says – an example script of AJAXed registration form, without recurring to AJAX frameworks (there are already many tutorials about this topic in relation with them). The example omits the synchronous part of the registration and focuses on the user name, which we want to asynchronously check. It doesn’t sound so weird if I say it in other words: check on the fly if the user name the person is typing already exists in the database or not, and take actions depending on whether it does or not (for instance, only allow form submission if name is available).
This is the basis for other types of effects like for instance searching contents and dynamically returning result suggestions, or checking if a specific word exists in the database, etc. but as I mentioned, here the intention is to use it on a registration form.
-
AJAXifying your site’s navigation
This post is inspired in Refreshing DIV content with AJAX. However this code does not actually automatically refresh the contents of a DIV but it refreshes them when the user clicks a link. The implementation of the code below allows to refresh the contents as mentioned, but the content retrieved can be different every time. This is very useful to make a website work in a similar way as with frames, but with more advantages and without the disadvantages of frames.I provide the code necessary to achieve this purpose but I don’t present it like a step-to-step tutorial. This is because I guess that for anyone with minimal knowledge of HTML and JavaScript is totally self-explanatory and because I would prefer you to make your website look like you want it to rather than like my post tells you to.
You can see a demo page with AJAX navigation here.


