What's not working about it?
I'm not sure I understand how the code is fitting together; perhaps if you posted the current implementation.
Here's a cut down version of my page. I've got firebug running and it issues a new get request as soon as the page is done 'rendering' the last function in the script tag below.
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-
<html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-
<meta http-equiv="Pragma" content="nocache"/>
-
<meta http-equiv="Cache-Control" content="private"/>
-
<meta http-equiv="Cache-Control" content="proxy-revalidate"/>
-
-
-
</head>
-
<body class="body" style="overflow:auto">
-
<form method="post" action="http://localhost:7001/mypage.jsp" id="S_25403" name="S_25403">
-
<input type="text" id="TransactionCode" title="Transaction Code" onchange="mydispatch('TransactionCode');" name="TransactionCode" value=""/>
-
</form>
-
<!-- Javascript -->
-
<script type="text/javascript" language="javascript1.1"><!--
-
var pageRefreshed = true;
-
-
function mydispatch(id, cmd) {
-
if (pageRefreshed) {
-
pageRefreshed = false;
-
document.forms[0].submit();
-
}
-
return true;
-
}
-
-
--></script>
-
</body>
-
-
</html>
-
The headers for the 1st POST
Cache-Control private,proxy-revalidate, private, proxy-revalidate
Date Thu, 10 May 2007 03:00:02 GMT
Pragma No-cache, nocache
Transfer-Encoding chunked
Content-Type text/html; charset=UTF-8
Expires Thu, 01 Jan 1970 00:00:00 GMT
X-Powered-By Servlet/2.4 JSP/2.0
robots NOINDEX,NOFOLLOW
Request Headers
Host localhost:7001
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Accept text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive
And the second GET
Connection close
Date Thu, 10 May 2007 03:00:04 GMT
Content-Length 2234
Content-Type text/html
X-Powered-By Servlet/2.4 JSP/2.0
Request Headers
Host localhost:7001
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Accept image/png,*/*;q=0.5
Accept-Language en-us,en;q=0.5
Accept-Encoding gzip,deflate
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive 300
Connection keep-alive