Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reload approaches 1

Status
Not open for further replies.

toolkit

Programmer
Joined
Aug 5, 2001
Messages
771
Location
GB
I am trying to reload a page created from a POST request. I have tried the following approaches:
Code:
# using <meta>
<meta http-equiv=&quot;REFRESH&quot; content=&quot;20&quot;>

# using javascript:
function dynamicPage() {
    setTimeout( &quot;countDown(10)&quot;, 1000 );
}

function countDown(n) {
    window.status = n + &quot; seconds to refresh&quot;;
    if( n == 0 )
        history.go(0);
        // self.location.reload( true );
    setTimeout( &quot;countDown(&quot; + (n-1) + &quot;)&quot;, 1000 );
}
The first method does not seem to work, because the POST data is not sent. The history and location methods the browser to pop-up an alert to confirm if the request is to be reposted. Anyone have a better way of refreshing a POST request?
Cheers, Neil
 
Create a hidden form n the results page and and fill it with all the data from the post. At the end of the countdown timer, submit the form with the post data.
 
ta :-) /images/star.gif++
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top