* extras/hbvpdf/hbvpdf.hbx
! two more corrections
* contrib/gtwvg/tests/_dyndlgs.prg
* contrib/hbct/doc/en/finan.txt
* contrib/hbct/readme.txt
* contrib/hbct/tests/asciisum.prg
* contrib/hbct/tests/trig.prg
* contrib/hbfoxpro/dll.prg
* contrib/hbhttpd/core.prg
* contrib/hbhttpd/widgets.prg
* contrib/hbmisc/fcomma.prg
* contrib/hbmlzo/tests/test.prg
* contrib/hbmxml/tests/custom.prg
* contrib/hbmzip/readme.txt
* contrib/hbnf/nwuid.prg
* contrib/hbnf/vidcur.prg
* contrib/hbtip/client.prg
* contrib/hbwin/tests/olesrv1.prg
* contrib/hbwin/tests/testprn.prg
* contrib/xhb/cstruct.prg
* contrib/xhb/hjwindow.prg
* contrib/xhb/hterrsys.prg
* contrib/xhb/htjlist.prg
* contrib/xhb/htmutil.prg
* contrib/xhb/tests/decode.prg
* contrib/xhb/xhberr.prg
* doc/cmdline.txt
* doc/en/objfunc.txt
* doc/en/set.txt
* doc/en/string.txt
* doc/pragma.txt
* extras/gfspell/spell.prg
* extras/gtwvw/docs/gtwvw.txt
* extras/gtwvw/tests/wvwtest9.prg
* extras/hbvpdf/core.prg
* extras/hbvpdf/fonts.prg
* extras/hbvpdf/tests/pdf_demo.prg
* extras/httpsrv/cgifunc.prg
* extras/httpsrv/home/counter.html
* extras/httpsrv/home/testxmldb.html
* extras/httpsrv/session.prg
* extras/httpsrv/uhttpd.prg
* tests/base64.prg
* tests/boxtest.prg
* tests/db_brows.prg
* tests/ddate.prg
* tests/inherit.prg
* tests/langmsg.prg
* tests/mathtest.prg
* tests/memtst.prg
* tests/readhrb.prg
* tests/switch.prg
* tests/testsha2.prg
* tests/testwarn.prg
* tests/tstdbi.prg
* tests/utf8at.prg
* utils/hbtest/hbtest.prg
* utils/hbtest/rt_class.prg
* utils/hbtest/rt_date.prg
* utils/hbtest/rt_hvma.prg
* utils/hbtest/rt_math.prg
* utils/hbtest/rt_misc.prg
* utils/hbtest/rt_trans.prg
* website/news.html
* website/news1.html
* website/samples.html
* website/samples/arreval.html
* website/samples/codebl.prg.html
* website/samples/dates3.html
* website/samples/switch.prg.html
* website/samples/testcgi.prg.html
* website/samples/tstmacro.prg.html
* rerun case fixer script after applying
some fixes, and this time it run fully
automatically.
91 lines
3.4 KiB
HTML
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
|
|
<div style="border: 1px solid black; padding: 10px;" id="pageSection"> </div>
|
|
<br />
|
|
|
|
<div style="border: 1px solid black; padding: 10px;" id="tableSection"> </div>
|
|
</body>
|
|
</html>
|