Ajax lookup function

Here is a simple look up function using ajax (XMLHttpRequest object).

function lookup(tbl,res,fld,val) {
var req;
var url='lookup.php?tbl='+tbl+'&res='+res+'&fld='+fld+'&val='+val;
req = false;
// branch for native XMLHttpRequest object

if(window.XMLHttpRequest) {
try {
req = new XMLHttpRequest();
} catch(e) {
req = false;
// branch for IE/Windows ActiveX version
} else if(window.ActiveXObject) {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
req = false;
if(req) {
//req.onreadystatechange = processReqChange;
req.open("GET", url, false);
return req.responseText;

Updated Ajax tutorials - Most wanted on Internet

I found some very useful Ajax related web sites, are rich ajax source code collection and tutorials. Follow them below for magnifying your Ajax skills.

1.www.ajax-tutorials.com - Ajax Tutorial Top List - Free tutorials, articles, examples for web 2.0.Ajax Tutorial TopList. More than 400 free tutorials, articles and examples sorted by categories.

2.www.ajaxprojects.com - Ajax Projects - Asynchronous Javascript and XML.

3.www.ajaxtutorial.net - Ajax Tutorial : Ajax Help and Tutorials.

4.www.ajaxrain.com - 1125 + Ajax/Javascript/Dhtml examples and demos to download.With a diverse collection of over 900 Ajax examples, java scripts, jQuery plug-ins, DHTML codes and demos from around the web, Ajaxrain gives you the perfect start to web development.

5.www.ajaxdaddy.com - AjaxDaddy - Ajax Examples in Action.Ajax examples, javascript scripts and web 2.0 demos in action.

6.freeajaxscripts.net - Ajax Code Examples, Free Ajax Scripts, Ajax Downloads - Free Ajax Scripts

7.www.ajax.org - Ajax.org - Declarative Development and Rich UI's

8.www.ajaxmatters.com - AJAX Matters : Indepth AJAX Tutorials, Articles and More

9.adaptivepath.com - adaptive path » ajax: a new approach to web applications.A User Experience design and consulting firm that unites theory and practice to advance the art of user experience design while helping clients make better business decisions. Located in San Francisco, California, USA.

10.developer.mozilla.org - Getting Started - MDC

11.developer.mozilla.org - AJAX:Getting Started - MDC

12.asp.net - ajax - Microsoft portal site for the ASP.NET development community. Download Visual Web Developer, post to the forums, read ASP.net blogs and learn about ASP.net.

13.w3schools.com - ajax - Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building.

.... they are most viewed ajax web sites on the internet. I hope you find them useful.

Creating an Ajax-driven Drop-down Menu System - 40

Useful Links on Adobe Flex

Your Ad Here

Latest Books on Adobe Flex