What Is AJAX ?
What Is AJAX ?
response.write("<table>")
do until rs.EOF
for each x in rs.Fields
response.write("<tr><td><b>" & x.name & "</b></td>")
response.write("<td> & x.value & "</td></tr>")
next
rs.MoveNext
loop
response.write("</table>")
XMLHTTP Object
• The object that is used to connect to the
remote server is called XMLHTTP.
• It resembles the Java’s URL object that is
used to access a specific URL and get the
contents.
Creating the object
• For IE 5.5:
objXmlHttp=new ActiveXObject(“Microsoft.XMLHTTP”)
• For Mozilla:
objXmlHttp=new XMLHttpRequest()
Sending information
• After creating the object, we can send information to the
web server and get the answer using this object’s
functions:
• GET METHOD: xmlhttp.open(“GET”, url, true)
xmlhttp.send()
• POST METHOD: xmlhttp.open("POST", url, true)
xmlhttp.send(“date=11-11-2006&name=Ali")