I have the following code:
<div id="results">loading image</div>
<script>
function load_url(url)
{
var obj;
if (window.XMLHttpRequest) obj = new XMLHttpRequest();
else if (window.ActiveXObject) obj = new ActiveXObject("Microsoft.XMLHTTP");
if (obj !== null)
{
obj.onreadystatechange = function()
{
if (obj.readyState == 4 && obj.status == 200)
{
var response = obj.responseText;
alert(response);
document.getElementById('results').innerHTML = response;
}
};
obj.open("GET", url, true);
obj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
obj.send();
}
}
load_url('_mainpageResults.cfm?tStatus=<cfoutput>#tStatus#&tFinalSort=#tFinalSort#&tDirection=#tDirection#&tSection=#tSection#&tSort=#tSort#</cfoutput>');
</script>
The initial load, while long (I think that's a factor of the page inside and the queries taking long, but that's a different issue) loads correctly. However, short of me changing something so that one of the parameters is different, the page doesn't register code changes.
For example, if, via the pulldown on the page I change the "tStatus" from "Open" to "Closed" it'll realize there's new code in there and run it. However, if I go back and change it to "Open" again, it'll just load up the old version and not realize that I've added code.
Also, in a possibly related note, the rendered table that comes back is WAY out of proportion.
I originally called this page using a <cfdiv>
but was advised against that by folks in here. This was working fine with the <cfdiv>
but I'm trying to make it cleaner.
Thanks.