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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

refresh prob

Status
Not open for further replies.

mthompo

Technical User
Jul 28, 2006
98
GB
hi i use the following in the head of my page to refresh
the page frequently

<meta http-equiv="refresh" content="10" URL="mfit3.asp";>

however when the page is refreshed it loses the date the page was on - so i need to adjust the url to include the date querystring

have tried

<meta http-equiv="refresh" content="10" URL="mfit3.asp?date="<%=motdate%>"";>

but doesnt work - can anyone help me?
 
thanks for your reply

motdate has value 29/08/2006
[changed variable date to motdate]
so put this in its place
<meta http-equiv="refresh" content="10" URL="http:/localhost/mfit/mfit3.asp?motdate=29/08/2006";>

went to the 1st and waited to see if on the refresh the page went to 29th - didnt work

next i put http:/localhost/mfit/mfit3.asp?motdate=29/08/2006 in the url to check and the page skipped to the 29th fine.

next i started using this instead
Code:
<SCRIPT language=Javascript> 
function refreshPeriodic() { 
   location.reload(); 
} 
timerID = setTimeout("refreshPeriodic()",6000); 
</SCRIPT>

which worked fine apart from everytime the page refreshed
i got the 'this page cannot be refreshed without resending info' RETRY/CANCEL message.

so to get round this i changed the form tag from POST to GET but now any variables that need to be submitted have to be in the url?

might give up and just out message at bottom saying click refresh for latest !!
 
if anyone is interested...

had to use absolute url
and because on my test pc the url contained localhost
it didnt seem to work?

<meta http-equiv="refresh" content="10;URL= Server.HTMLEncode(motdate&"") %>">

i have another issue in that with this you have to login twice!
it seems to lose the login session the first time you login?
if you login again t works fine - if i take out the refresh bit it works fine

any ideas on how to find te fault welcome
 
ok - found out what the prob is
when i preview from my html editor the URL includes
localhost - but when the refresh occurs
it uses my ip address

have a good weekend
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top