+ examples/uhttpd2
+ examples/uhttpd2/umain.prg
+ examples/uhttpd2/files
+ examples/uhttpd2/files/main.js
+ examples/uhttpd2/files/main.css
+ examples/uhttpd2/uhttpd2.hbp
+ examples/uhttpd2/uwidgets.prg
+ examples/uhttpd2/carts.dbf
+ examples/uhttpd2/uhbext.prg
+ examples/uhttpd2/app.prg
+ examples/uhttpd2/socket.c
+ examples/uhttpd2/items.dbf
+ examples/uhttpd2/readme.txt
+ examples/uhttpd2/users.dbf
+ Added contribution of Mindaugas Kavaliauskas:
small-footprint multithreading http server with session model.
Read the whole description in readme.txt.
+ examples/httpsrv
+ examples/httpsrv/httpsrv.hbp
+ Somehow missed from prev.
40 lines
707 B
JavaScript
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);
|
|
}
|
|
|