473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to refresh page without prompt the "resend information...."?

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

Jul 17 '06 #1
10 32815

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
Have you tried to implement AJAX into the script? That would allow you
to keep it all updated without refreshing the page, and in my opinion
would be much better.

Jul 17 '06 #2

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
Have you tried to implement AJAX into the script? That would allow you
to keep it all updated without refreshing the page, and in my opinion
would be much better.

Jul 17 '06 #3
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
Jul 17 '06 #4
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
Jul 17 '06 #5
"phforum" <ph*****@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
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.

Use GET instead of POST.

And for the people who commented, please don't take this the wrong way, but
you can shove the ajax up your ass.

--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@bhgbyrzcv.arg)
Jul 17 '06 #6

As you specified, GET method can be used instead of POST and there will
not be any dialog box during reload (as required).

There are ways and it depends on how you want to implement the
requirement.
<script>
<!--
/* Auto Refresh Page with Time script By JavaScript Kit
(javascriptkit.com) */
//enter refresh time in "minutes:seconds" Minutes should range from 0
to inifinity. Seconds should range from 0 to 59
var limit="0:<?php echo $refsec ?>"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}

function beginrefresh(){
if (!document.images) {
return
}
if (parselimit==1) {
window.location.reload()
} else {
//get the minutes, seconds remaining till next refersh
parselimit-=1
curmin = Math.floor(parselimit/60)
cursec = parselimit%60
//update the status bar displaying how much time left until next page
refresh
if (curmin!=0) { curtime=curmin+" minutes and "+cursec+" seconds left
until page refresh!" }
else { curtime=cursec+" seconds left until page refresh!" }
window.status=curtime
//set the time limit after which to call beginrefresh function
//it is set as 1000 ms, so that to refresh the status bar every one
sec.
setTimeout("beginrefresh()",1000)
}
}
//call the function beginrefresh
window.onload=beginrefresh
//-->
</script>
you can remove the "else" case in beginrefresh(). It will just show in
status bar how much time is left for next refreash.

set refresh seconds in php variable "refsec" from config file or you
can hard code it from there itself as
var limit="0:59"

it works even as
var limit="0:60"
var limit="0:120"

Kimmo Laine wrote:
"phforum" <ph*****@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
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.


Use GET instead of POST.

And for the people who commented, please don't take this the wrong way, but
you can shove the ajax up your ass.

--
"ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" -lpk
sp**@outolempi.net | Gedoon-S @ IRCnet | rot13(xv***@bhgbyrzcv.arg)
Jul 17 '06 #7
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
That's a browser issue, not a PHP one. You would have to turn off the
message in the browser's options.

Using GET instead of POST will work. Or you could use javascript to do
the auto-refresh.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '06 #8
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.
js*******@attglobal.net
==================
Jul 17 '06 #9
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.
js*******@attglobal.net
==================
Jul 18 '06 #10
Kimmo Laine wrote:
Use GET instead of POST.

And for the people who commented, please don't take this the wrong way, but
you can shove the ajax up your ass.
M y sentiments exactly, with one minor correction: there is only one
way to shove something up somebody's rear, so it cannot be "taken the
wrong way".

--
Mladen Gogala
http://www.mgogala.com
Jul 18 '06 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
3
by: Metnetsky | last post by:
I'd like to build a function that is executed when someone clicks on an image. Once clicked, I need some parameters passed to a URL which PHP will accept and deal with database connections. ...
8
by: dave | last post by:
Hi there I'm trying to force save as dialogue using this code in download.asp..but when it runs it prompts for download.asp to save or open. code snippet (from aspfaq.com) ...
2
by: Munnu | last post by:
How can I make asp page that prints the contact information in 3.5"x5.5" (like business card) area? I have asp page that contains the information for my contact and I need to make one more view on...
4
by: papaja | last post by:
Hi, I posted this on asp.net forums already, but nobody answered it. Here is direct link: http://forums.asp.net/1124640/ShowPost.aspx. Here is the question: I'm using this code in delete...
1
by: achoo | last post by:
Is it possible to extend a Web service proxy so that it understands an HTTP refresh page? Explanation: * The Web service proxy was autogenerated by Visual Studio .NET 2003 from the Web...
1
by: Owen Richardson | last post by:
I have an asp.net website where i have a quick search facility built into my master page. the search is a web control, with a drop down country box and a list box full of cities. When i select...
17
by: axlq | last post by:
Situation: User submits a form, gets a page returned. User clicks the "reload button." Normal result: Browser asks to confirm re-submitting of the form data. That's not what I want. What I...
5
by: Jeremy | last post by:
Hi all, I have database actions that will potentially take several seconds to complete. My normal page uses AJAX so keeping the user informed of what is happening is not a problem. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.