473,899 Members | 3,039 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 32904

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="JavaS cript">
window.onload = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");

setInterval("Ge tData('<?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="JavaS cript">
function UpdateData() {
clearInterval(d ataupdate);
dataupdate = setInterval(Upd ateData(),
document.getEle mentById("refin terval").value) ;

GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
}

var dataupdate;
window.onload = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
dataupdate = setInterval(Upd ateData(), 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="JavaS cript">
window.onload = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");

setInterval("Ge tData('<?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="JavaS cript">
function UpdateData() {
clearInterval(d ataupdate);
dataupdate = setInterval(Upd ateData(),
document.getEle mentById("refin terval").value) ;

GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
}

var dataupdate;
window.onload = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
dataupdate = setInterval(Upd ateData(), 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******** *************@p 79g2000cwp.goog legroups.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***@bhg byrzcv.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:second s" Minutes should range from 0
to inifinity. Seconds should range from 0 to 59
var limit="0:<?php echo $refsec ?>"

if (document.image s){
var parselimit=limi t.split(":")
parselimit=pars elimit[0]*60+parselimit[1]*1
}

function beginrefresh(){
if (!document.imag es) {
return
}
if (parselimit==1) {
window.location .reload()
} else {
//get the minutes, seconds remaining till next refersh
parselimit-=1
curmin = Math.floor(pars elimit/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=c urtime
//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("beg inrefresh()",10 00)
}
}
//call the function beginrefresh
window.onload=b eginrefresh
//-->
</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******** *************@p 79g2000cwp.goog legroups.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***@bhg byrzcv.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*******@attgl obal.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="JavaS cript">
window.onlo ad = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");

setInterval("Ge tData('<?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="JavaS cript">
function UpdateData() {
clearInterval(d ataupdate);
dataupdate = setInterval(Upd ateData(),
document.getE lementById("ref interval").valu e);

GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
}

var dataupdate;
window.onlo ad = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
dataupdate = setInterval(Upd ateData(), 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
informatio n. 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*******@attgl obal.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="JavaS cript">
window.onloa d = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");

setInterval("Ge tData('<?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="JavaS cript">
function UpdateData() {
clearInterval(d ataupdate);
dataupdate = setInterval(Upd ateData(),
document.getEl ementById("refi nterval").value );

GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
}

var dataupdate;
window.onloa d = function(){
GetData("<?php echo $postvar1; ?>", "<?php echo $postvar2; ?>");
dataupdate = setInterval(Upd ateData(), 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*******@attgl obal.net
=============== ===
Jul 18 '06 #10

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

Similar topics

13
40802
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 style="display:none"> can be displayed by setting the style attribute to "display:", or hidden with "display:none". This gives the illusion that the person filling out the form is switching from page to page...without the overhead of extra hits on the server,...
3
4596
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. Sounds simple, and is simple. The only thing that stumps me is that I do not want that PHP page loaded anywhere that someone would see it. And preferably no frames if possible. Any suggestions? ~ Matthew
8
2994
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) Response.ContentType = "application/x-unknown" ' arbitrary fn = "wallpaper_1_1.jpg" Response.write "<br>" & Server.MapPath("wallpaper") & "<br>" FPath = Server.MapPath("wallpaper") & fn
2
1742
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 that which is client card, which show some information from contact profile in 3.5"x5.5" as well as can be print on same size on printer? How can I make asp page with 3.5"x5.5" size?
4
1551
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 command of datagrid: **************** Dataset1.DSataTable1.Rows(e.Item.ItemIndex).Delete() adp.Update(DataSet1)
1
2271
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 service's WSDL. It inherits from System.Web.Services.Protocols.SoapHttpClientProtocol. * The Web service is hiding behind a load-balancing content switch
1
1664
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 my country my citylist is refreshed ok. I want to be able to then click on my city and jump to a specific page without loosing state; and i dont know how. Currently My change event on my city listbox does a...
17
5688
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 want is behavior like what Wikipedia does, as well as vBulletin forums and other nice php-based sites: Situation: User submits a form, gets a page returned. User clicks
5
3243
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. However, the page also has fallback code in case of no Javascript. In this case I would like to display temporary "please wait" type page
0
9997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11272
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10863
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9666
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, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5887
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4720
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3317
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.