using an AJAX function to return a value - HELP!
1) code: document.getElementById("Field").value=ajax("getFieldValue",id).value;
2) In the ajax() function the xmlhttp.onreadystatechange() event function is set with contents that put the response into my xml object.
3) ajax() function begins to wait for the server response by testing request.readyState.
4) The onreadystatechange() works its magic and populates my global xml object with the data from the server.
5) ajax() function returns the xml object (or filtered data from the object depending on the particular type of ajax request being called) to the code in part 1 and the xml.value is entered into 'Field'.
This is just an example of what I want it to do as the whole idea is that I can use the ajax function for many dirrerent instances of data retrival rather than hardcode lines into the ajax function telling it to change specific DOM elements.
Hope that makes a bit of sense and I hope someone can help.
Last edited by k285715; 06-22-2007 at 02:42 AM.
Last Post: 12-01-2012, 04:12 AM
Last Post: 05-22-2007, 02:19 AM
Last Post: 04-25-2007, 11:39 AM
Last Post: 02-22-2007, 07:40 PM
By Marcos in forum VB Classic
Last Post: 01-25-2006, 11:18 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL