* utils/hbmk2/hbmk2.prg
+ links to markdown and markdown to man-page converter tool
! minor cleanup to prev
* utils/hbmk2/hbmk2.1
* some updates
* ChangeLog.txt
! typos/updates in previous entry
* extras/hbdoc/*.prg
* src/rtl/memoedit.prg
* tests/clasinh.prg
* tests/classch.prg
* tests/inhprob.prg
! updated for new ::super: syntax
* src/rtl/itemseri.c
! fixed typo in latest modification:
'warning: use of unary operator that may be intended as compound assignment (+=)'
* contrib/hbgd/tests/test_out.prg
* contrib/hbhttpd/*
* contrib/hbtip/thtml.prg
* contrib/xhb/*.prg
* extras/httpsrv/*
* extras/guestbk/*
* website/faq/*.html
* website/samples/HowToBuildOnLinux.html
* website/third-party.html
* some steps to modernize old HTML
* extras/hbdoc/*.prg
* do not use [] as string delimiter
- tests/function.cfm
- website/samples/function.cfm.html
* .gitattributes
- obsolete file deleted
57 lines
1.4 KiB
HTML
57 lines
1.4 KiB
HTML
<html>
|
|
<head>
|
|
<title>Simple Ajax Example</title>
|
|
<script language="Javascript">
|
|
|
|
function xmlhttpPost(strURL)
|
|
{
|
|
var xmlHttpReq = false;
|
|
var self = this;
|
|
// Mozilla/Safari
|
|
if ( window.XMLHttpRequest )
|
|
{
|
|
self.xmlHttpReq = new XMLHttpRequest();
|
|
}
|
|
// IE
|
|
else if ( window.ActiveXObject )
|
|
{
|
|
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
|
|
}
|
|
self.xmlHttpReq.open('POST', strURL, true);
|
|
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
self.xmlHttpReq.onreadystatechange = function()
|
|
{
|
|
if ( self.xmlHttpReq.readyState == 4 )
|
|
{
|
|
updatepage( self.xmlHttpReq.responseText );
|
|
}
|
|
}
|
|
self.xmlHttpReq.send( getquerystring() );
|
|
}
|
|
|
|
function getquerystring()
|
|
{
|
|
var form = document.forms[ 'f1' ];
|
|
var word = form.word.value;
|
|
qstr = 'w=' + escape(word); // NOTE: no '?' before querystring
|
|
return qstr;
|
|
}
|
|
|
|
function updatepage( str )
|
|
{
|
|
document.getElementById( "result" ).innerHTML = str;
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
This is a simple ajax test. Please type a string in input field and press GO button.
|
|
<form name="f1">
|
|
<p>word: <input name="word" type="text">
|
|
<input value="Go" type="button" onclick='JavaScript:xmlhttpPost("/cgi-bin/testajax.hrb")'></p>
|
|
<div id="result"></div>
|
|
</form>
|
|
Return to <a href="/">Main Page</a>
|
|
</body>
|
|
</html>
|