Files
harbour-core/harbour/examples/httpsrv/home/testxmldb.html
Viktor Szakats 91bd1aee41 2009-06-15 18:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* utils/hbmk2/hbmk2.prg
    - Deleted hb_DirBase() DJGPP hack after Przemek's fix.
    - Deleted gcc compiler command line hack after Przemek's fix.

  * contrib/hbxbp/xbp.ch
    + Added extra protection for Windows-only debug line.

  * contrib/hbxbp/apig.ch
    * Minor in comment.

  * contrib/rddado/adordd.prg
    * Minor formatting.
    * Changed it to use non-legacy OLE interface.
      PLEASE REVIEW & TEST.

  * contrib/hbwin/legacy.prg
    + Added support for TOleAuto():cClassName var.
    + Added RTE generation in case the OLE object cannot be created.
      PLEASE REVIEW & TEST.

  + contrib/rddado/tests/test.mdb
    + Added. It's generated by access2.prg to avoid any problems.

  * contrib/rddado/tests/access1.prg
    * Minor formatting.
    ; TOFIX: Does't work:
      ---
      Error BASE/3012  Argument error: OPEN
      Called from WIN_OLEAUTO:OPEN(0)
      Called from ADO_OPEN(0)
      Called from DBUSEAREA(0)
      Called from MAIN(11)
      ---

  - examples/uhttpd
  + examples/httpsrv
  - examples/httpsrv/uhttpd.ini
  + examples/httpsrv/httpsrv.ini
  - examples/httpsrv/uhttpdgd.hbp
  + examples/httpsrv/httpsrvg.hbp
  - examples/httpsrv/uhttpdc.c
  + examples/httpsrv/httpsrvc.c
  - examples/httpsrv/uhttpd.prg
  + examples/httpsrv/httpsrv.prg
  * examples/httpsrv/cookie.prg
  * examples/httpsrv/cgifunc.prg
  * examples/httpsrv/session.prg
  * examples/httpsrv/readme.txt
    * Renamed uhttpd to httpsrv.
      NOTE: If there are better names proposed I can rename 
            it to anything else. Mindaugas's new uhttpd will 
            be name uhttpd2 to avoid any ambiguity.
2009-06-15 18:02:57 +00:00

91 lines
3.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Part 4 Example</title>
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script type="text/javascript" src="/js/ajax.js"></script>
<script type="text/javascript">
// <![CDATA[
var divpart;
/**
* Requests table data for a specific page.
*
* @param pageNum the page number to request data for
*/
function getTableData(pageNum)
{
xslGet( "/xsl/based.xsl" );
xmlGet( '/cgi-bin/tableservletdb.hrb?page=' + pageNum + "&sid=" + Math.random(), tableResponseHandler);
divpart = 'tableSection';
}
function getTablePages()
{
xslGet( "/xsl/basep.xsl" );
xmlGet( '/cgi-bin/tableservletdb.hrb?count=true' + "&sid=" + Math.random(), tableResponseHandler);
divpart = 'pageSection';
}
/**
* Handler for server's response to table requests.
* Table content is pulled from response XML and a HTML
* table is built. The table is then inserted into the
* 'tableSection' DIV.
*/
function tableResponseHandler()
{
// Make sure the request is loaded (readyState = 4)
if (req.readyState == 4)
{
// Make sure the status is "OK"
if (req.status == 200)
{
// shutdown Ajax loading progress
EndProgress();
// Make sure the XSL document is loaded
if (!xsldocloaded)
{
alert('Unable to transform data. XSL is not yet loaded.');
// break out of the function
return;
}
// transform
//document.write( xsldoc );
combine_XLM_XSLT_HTML( req, xsldoc, document, divpart );
xsldocloaded = null;
xsldoc = null;
}
else
{
alert("There was a problem retrieving the XML data:\n" +
req.statusText);
}
}
}
// ]]>
</script>
</head>
<body onload="getTablePages()">
<BIG>Simple XML servlet</BIG>
<br>
<br>Tested with IE6+, Firefox 2+ and Opera 9+. Not working with Google Chrome, Safari.
<br>Please note that tableservletdb.prg simulates a slow reply of 0.5 seconds.
If you want to check real speed please comment #define SIMULATE_SLOW_REPLY in source.
<br>Return to <a href="/">Main Page</a>
<br>
<br>Select a Page&nbsp;
<div style="border: 1px solid black; padding: 10px;" id="pageSection">&nbsp;</div>
<br />
<div style="border: 1px solid black; padding: 10px;" id="tableSection">&nbsp;</div>
</body>
</html>