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 03:42 AM.
Last Post: 12-01-2012, 05:12 AM
Last Post: 05-22-2007, 03:19 AM
Last Post: 04-25-2007, 12:39 PM
Last Post: 02-22-2007, 08:40 PM
By Marcos in forum VB Classic
Last Post: 01-25-2006, 12:18 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center