if (type == WebServer::GET)
{
P(message) =
"<!DOCTYPE html><html><head>".........
.......
"<script>";
function loadXMLDoc();
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
but I am getting errors like:
'function' was not declared in this scope,
'loadXMLDoc' was not declared in this scope,
'window' was not declared in this scope etc
haven't I understand well the call back for AJAX will be written in that part or not?
thanks in advance