Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: how to refresh


Message #1 by "Mark Collins" <mark.collins@c...> on Thu, 22 Feb 2001 17:16:15
Hi all,



is there any way to have some sort of page refresh function available when 

a page is loaded?



Message #2 by Gregory_Griffiths@c... on Thu, 22 Feb 2001 17:58:23 +0000
you can possibly use the onLoad Javascript event or just embed some 

Client Side scripting on the form, or use Meta Tags.

Message #3 by "Eric Van Camp" <eric@a...> on Thu, 22 Feb 2001 18:46:15 -0000
it can even be done with html...

but do you want to use response.redirect? or is it something else you want

to know?

eric



Message #4 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Fri, 23 Feb 2001 10:10:33 -0000
do you want the page to refresh itself as soon as it is loaded?



<body onload="window.navigate(document.location.href);">



you can hard-code the page url instead of document.location.href



if you want a delay before the page refreshes, use a meta tag in your header



<meta http-equiv="refresh" content="5">



would refresh the page after 5 seconds



-----Original Message-----

From: Mark Collins [mailto:mark.collins@c...]

Sent: Thursday, February 22, 2001 5:16 PM

To: ASP Web HowTo

Subject: [asp_web_howto] how to refresh





Hi all,



is there any way to have some sort of page refresh function available when 

a page is loaded?



________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com

Message #5 by "Mark Collins" <mark.collins@c...> on Sat, 24 Feb 2001 16:39:23
Thanks for the tips, there are problems though:



When I put this code in '<body onload="window.navigate

(document.location.href);">', the page constantly represhes itself. It has 

the desired effect, but I only want it to refresh itsef once. Using the 

other code '<meta http-equiv="refresh" content="5">' causes a refresh 

every 5 seconds, as said I only want a single refresh.



It is probably a bit of a strange request to want to do this, but the 

reason for it is as follows:



I input data from a form into a database. The data is entered into the 

database successfully, but when I do a response.redirect to show a display 

of the contents of the database, the new data does not show. BUT, When I 

do a refresh the new data shows. I probably need to re-write my original 

code, but I would still like to be able to get a single refresh for the 

time being.



Thanks again for your input



Regards



Mark. 



> do you want the page to refresh itself as soon as it is loaded?

> 

> <body onload="window.navigate(document.location.href);">

> 

> you can hard-code the page url instead of document.location.href

> 

> if you want a delay before the page refreshes, use a meta tag in your 

header

> 

> <meta http-equiv="refresh" content="5">

> 

> would refresh the page after 5 seconds

> 

> -----Original Message-----

> From: Mark Collins [mailto:mark.collins@c...]

> Sent: Thursday, February 22, 2001 5:16 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] how to refresh

> 

> 

> Hi all,

> 

> is there any way to have some sort of page refresh function available 

when 

> a page is loaded?
Message #6 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Mon, 26 Feb 2001 16:16:23 -0000
add an extra parameter to the querystring, and then only refresh the page if

the parameter is not there





response.write "<body "



if not request.querystring("refreshed")="yes" then

response.write "onload=""window.navigate(document.location.href +

'?refreshed=yes');"""

end if



response.write ">"



-----Original Message-----

From: Mark Collins [mailto:mark.collins@c...]

Sent: Saturday, February 24, 2001 4:39 PM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: how to refresh





Thanks for the tips, there are problems though:



When I put this code in '<body onload="window.navigate

(document.location.href);">', the page constantly represhes itself. It has 

the desired effect, but I only want it to refresh itsef once. Using the 

other code '<meta http-equiv="refresh" content="5">' causes a refresh 

every 5 seconds, as said I only want a single refresh.



It is probably a bit of a strange request to want to do this, but the 

reason for it is as follows:



I input data from a form into a database. The data is entered into the 

database successfully, but when I do a response.redirect to show a display 

of the contents of the database, the new data does not show. BUT, When I 

do a refresh the new data shows. I probably need to re-write my original 

code, but I would still like to be able to get a single refresh for the 

time being.



Thanks again for your input



Regards



Mark. 



> do you want the page to refresh itself as soon as it is loaded?

> 

> <body onload="window.navigate(document.location.href);">

> 

> you can hard-code the page url instead of document.location.href

> 

> if you want a delay before the page refreshes, use a meta tag in your 

header

> 

> <meta http-equiv="refresh" content="5">

> 

> would refresh the page after 5 seconds

> 

> -----Original Message-----

> From: Mark Collins [mailto:mark.collins@c...]

> Sent: Thursday, February 22, 2001 5:16 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] how to refresh

> 

> 

> Hi all,

> 

> is there any way to have some sort of page refresh function available 

when 

> a page is loaded?



________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com


  Return to Index