What is AJAX?

March 29, 2005 by  
Filed under Javascript

Stacee asked me if I knew what AJAX was. And I told her I had no idea. And when I don’t know something, I usually ask Google. ;)

According to Wikipedia, AJAX, or Asynchronous Javascript & XMLHttpRequest is..

a web development technique for creating interactive web applications using a combination of :

  • HTML (or XHTML) and Cascading Style Sheets for presenting information
  • Document Object Model and Javascript to dynamically display and interact with the information presented
  • XML and XSLT to interchange and manipulate data asynchronously with the web server (although AJAX applications can also use other technologies, including plain text, to do this as well).

Like DHTML or LAMP, AJAX is not a technology in itself, but a term that refers to the use of a group of technologies together.

AJAX applications use web browsers that support the above technologies as a platform to run on. Browsers that support these technologies include Mozilla Firefox, Internet Explorer, Opera, and Safari.

When I saw this example of Ajax, and this one, I was really impressed! Now I’m wondering if I should also incorporate this technology into my CMS!

More Examples:

More Resources:

XMLHttpRequest

March 29, 2005 by  
Filed under Javascript, Scripts and Coding

My friend Will introduced me to XMLHttpRequest.

As deployment of XML data and web services becomes more widespread, you may occasionally find it convenient to connect an HTML presentation directly to XML data for interim updates without reloading the page. Thanks to the little-known XMLHttpRequest object, an increasing range of web clients can retrieve and submit XML data directly, all in the background. To convert retrieved XML data into renderable HTML content, rely on the client-side Document Object Model (DOM) to read the XML document node tree and compose HTML elements that the user sees.

Basically, this XMLHttpRequest object is a nifty little Javascript object that offers a nice way for webpages to get information from servers without having to refresh themselves or get user input.

Here is an example of Google’s use of the XMLHttpRequest object. Notice how when you start typing, data is suggested to you. This is done dynamically using XML and Javascript. Very interesting isn’t it?

Other XMLHttpRequest Resources:

Javascript: Nifty Nice Titles

March 25, 2005 by  
Filed under CSS, Javascript, Scripts and Coding

I noticed that some websites had these nifty popup divs that came up when I hovered over the titles. I was curious, so I googled, and found this “Nice Titles” article. I decided to test it on my site, and viola, I have nice titles! It was pretty easy to install. I just uploaded the nicetitle.js file to my theme directory. Then add the CSS classes from nicetitle.css into my style.css. Then modified the background image and uploaded that to my images/ directory. Then I added:

<script type="text/javascript" src="nicetitle.js">
</script>

to my header.php file. :) I love transparent PNG! You can see through the div!

While looking at the stylesheet definitions, I also learned something new.

-moz-border-radius: 12px;

This style attribute make the edges of it’s class rounded. Unfortunately, it only works in Mozilla/Firefox. But it’s nifty nevertheless!