|
|
AJAX DropDownList
|
02/19/2006 By Enrico Elizar Samuel
|
AJAX (Asynchronous JavaScript and XML) has become so popular, thanks to Google Suggest. AJAX has opened the possibility to make more responsive and interactive web applications, bringing them closer to Windows form applications. Web developers are the bunch of guys who were happy at first. They have a new toy, which is composed of old toys they have neglected so far, and now they can make cool things with the toy. On the other hand, after getting their free account in GMail, end users demand more with their department web application. They hate postback, they want no refresh, and everything just stays there but still gets up-to-date. Is it possible?
Those demanding users are my motivation to create this custom control. Let me introduce AjaxDropDownList, my first attempt to contribute into AJAX world. AjaxDropDownList is a dropdownlist control that has the following features:
Fetch data asynchronously in the background from a server source, with no postback.
Can trigger change event to other dropdownlists, thus generating a cascading linked dropdownlist effect.
Is encapsulated into a single control which can be easily dragged and dropped into the designer or added from the server code.
Uses common code to access the selectedItem just like a normal dropdownlist, thus can be easily integrated with other UI framework.
Compatible with Internet Explorer 6, Mozilla Firefox 1.04, and Netscape 8.02.
Although I call the control as AjaxDropDownList, it does not use XML to transfer the data. I use JSON (JavaScript Object Notation) by Douglas Crockford which is more lightweight and can be easily consumed by JavaScript as an object. I am aware of the potential and flexibility that XML offers compared to JSON. But in my case, JSON is enough to serve the requirements.
Read Full Tutorial
|
Rate this Ajax Tutorials
Rating: 8.3 out of 4 votes cast
| |
|
|
|
|
|
|
|
|
|
|
|
|