Files
harbour-core/harbour/contrib/hbhttpd/tests/files/main.js
Viktor Szakats 6e4a8de207 2010-11-24 01:55 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbplist
  - examples/uhttpd2
  + contrib/hbhttpd
    + Moved uhttpd2 to contrib area under the name hbhttpd.
2010-11-24 00:55:47 +00:00

40 lines
707 B
JavaScript

function getXmlHttp()
{
var obj=null;
if( window.XMLHttpRequest )
{
obj = new XMLHttpRequest();
}
else if( window.ActiveXObject )
{
obj = new ActiveXObject("Microsoft.XMLHTTP");
}
if ( obj == null )
{
alert("Browser does not support HTTP Request");
}
return obj;
}
function ubrcall(id,param)
{
var tbl = document.getElementById(id);
var r = getXmlHttp();
r.open("GET", "?ajax=" + id + "&" + param, true);
r.onreadystatechange=function ()
{
if( r.readyState == 4 )
{
if( r.status == 200 )
{
tbl.innerHTML = r.responseText;
}
r = null;
}
}
r.send(null);
}