Hi, I'm new here. This may belong in the Java script forum but I'll try here because it also involves basic HTML.

I installed a script that I obtained from this web site, it gives visitors to my web pages a choice in the auto-refresh rates. The script appears to be installed correctly BUT when a refresh now occurs , the user receives a pop up box that says ..

"the page your are trying contains POSTDATE, if you resend the data any action the form carried out will be repeated"

Then the user has an option of OK or Cancel.

How do I prevent this from re-occuring at each refresh? Previous when I had a simple auto-refresh command, this box did not pop up at each refresh.

The post data script is

</script> <input size="50" maxlength="200" name="text" /> <input type="submit" value="Post" /></p></form><?php } else { echo "<p>You must create an info cookie to post.</p>"; } ?>
<div style="font-family: monospace;">

The variable auto-refresh script that I obtained from this forum is listed below.


title>User's Choice Refresh Rate - Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<script type="text/javascript">

function createCookie(name,value,days)
{
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name)
{
createCookie(name,"",-1);
}


var reIt

function doit(){
if (window.location.reload)
window.location.reload( true );
else if (window.location.replace)
window.location.replace(unescape(location.href))
else
window.location.href=unescape(location.href)
}

function startUp(){
// uncomment below line for testing only
//alert(readCookie('resetInt'))
if (readCookie('resetInt')!=null)
reIt=setTimeout("doit()", readCookie('resetInt'))
else
return;
}

function setRe(val){
clearTimeout(reIt)
if (val==0){
eraseCookie('resetInt')
return;
}
else
// 7 in the below line is the number of days persistence
createCookie('resetInt', val*1000, 7)
startUp();
}

onload=startUp;

</script>
<span>New ! Set your personal refresh rate:</span>
<input type="button" value="1 Minute" onclick="setRe(60);">
<input type="button" value="2 Minute" onclick="setRe(120);">
<input type="button" value="5 Minute" onclick="setRe(300);">
<input type="button" value="No Refresh" onclick="setRe(0);"><span><sub>(default)</sub><br>Your choice will persist site wide for 1 week unless changed or you clear your browser's cookies.</span>

<?php if($cooked == 1) { ?><p /><form method="post" action="drsked.php"><p>Enter your message here.
<script language="JavaScript">

//Refresh page script- By Brett Taylor (glutnix@yahoo.com.au)
//Modified by Dynamic Drive for NS4, NS6+
//Visit http://www.dynamicdrive.com for this script




</script> <input size="50" maxlength="200" name="text" /> <input type="submit" value="Post" /></p></form><?php } else { echo "<p>You must create an info cookie to post.</p>"; } ?>
<div style="font-family: monospace;">