Re: How to refresh page without prompt the "resend information...."?
- From: "phforum" <phforum@xxxxxxxxx>
- Date: 17 Jul 2006 19:05:48 -0700
Thanks Manish, Kimmo Laine, Jerry Stuckle three expert.
The problem solved after using GET.
Thanks again. ^_^
Jerry Stuckle 寫道:
phforum wrote:
Hi Manish,
I tried your script. But the page won't auto refresh. (Sorry I am a
php newbie and no Javascript knowledge) And I press F5 the IE still
prompt the warning message.
Thanks
PH
Manish 寫道:
I used ajax for the same feature
<script language="JavaScript">
window.onload = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
setInterval("GetData('<?php echo $postvar1; ?>', '<?php echo
$postvar2; ?>')", 60000)
}
</script>
if you want to change the refresh time dynamically (1 min to say 5 min)
<script language="JavaScript">
function UpdateData() {
clearInterval(dataupdate);
dataupdate = setInterval(UpdateData(),
document.getElementById("refinterval").value);
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
}
var dataupdate;
window.onload = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
dataupdate = setInterval(UpdateData(), 60000)
}
</script>
onchange of refinterval : UpdateData()
phforum wrote:
Hi,
I wrote a PHP page for user input the information to search the
database. And the database data will update every second. I want to
set the auto refresh to get the data from database every minute. But
the page always display the dialog box ask me to resend the
information. How to disable this warning message. I using POST and
REQUEST to get the data from user input page.
Thanks all
Of course it will. You're telling the browser to refresh, instead of
letting the javascript do it.
Let Manish's script submit the page for you instead of doing it manually.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- How to refresh page without prompt the "resend information...."?
- From: phforum
- Re: How to refresh page without prompt the "resend information...."?
- From: Manish
- Re: How to refresh page without prompt the "resend information...."?
- From: phforum
- Re: How to refresh page without prompt the "resend information...."?
- From: Jerry Stuckle
- How to refresh page without prompt the "resend information...."?
- Prev by Date: Pfpro enabled, but function not found
- Next by Date: Re: Duplicate records added from post forms, easy solutions?
- Previous by thread: Re: How to refresh page without prompt the "resend information...."?
- Next by thread: Re: How to refresh page without prompt the "resend information...."?
- Index(es):