cfdiv refresh
I have a page where there is dynamic text and a form. I want to refresh the section containing the dynamic text. I dont want the form section to refresh.
Initially the page displays OK but on refresh anything after cfdiv is dupllicated on the screen. any ideas?
refesh_test.cfm:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
function refreshdata() {
ColdFusion.navigate('refresh_test.cfm','testdiv');
}
</script>
</head>
<body onload="window.setInterval('refreshdata()',5000)">
<cfdiv id="testdiv">
<p>sample text here to be refreshed....</p>
</cfdiv>
<p>this form is not to be refreshed...</p>
<form action="post.cfm" method="post" name="test">
<input name="test_field" type="text" />
<input name="submit" type="submit" />
</form>
</body>
</html>
