AUTO REFRESH (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


nay27uk -> AUTO REFRESH (5/13/2003 9:47:16)

Could someone tell me how i get a page to auto refresh.
(Example) I have made a guest book using frontpage access2002 database and asp pages. now when you fill the form out and return to see your input you have to manualy refresh the page to display the new input.
I want to have it auto refresh like this site does when you reply or start a new thread




Eli -> RE: AUTO REFRESH (5/13/2003 10:28:48)

a nice little javascript code would do it. If you want a button would could use somthing like:

<' a href=" javascript:location.reload()"  target=" _self" >Refresh</a>


or automatically:

<script type=text/javascript>
// The time out value is set to be 10,000 milli-seconds (or 10 seconds)
setTimeout(' document.location=document.location' ,10000);
</script>




nay27uk -> RE: AUTO REFRESH (5/13/2003 11:03:41)

Sorry if i seem dumb but i dont know what you meen by
=====================================================
a nice little javascript code would do it. If you want a button would could use somthing like:

<' a href=" javascript:location.reload()" target=" _self" >Refresh</a>

What do i do with this code i tryed it on a blank page but ther was no button
=====================================================
also how do this part work againe i tryed it on blank page with a picture but it never refreshed

or automatically:

<script type=text/javascript> // The time out value is set to be 10,000 milli-seconds (or 10 seconds) setTimeout(' document.location=document.location' ,10000); </script>

=====================================================
i found this script but its not what i want it refreshes every so many seconds or minuits

<script>
<!--

/*
Auto Refresh Page with Time script
By JavaScript Kit (javascriptkit.com)
Over 200+ free scripts here!
*/

//enter refresh time in " minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit=" 0:60"

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{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and " +cursec+" seconds left until page refresh!"
else
curtime=cursec+" seconds left until page refresh!"
window.status=curtime
setTimeout(" beginrefresh()" ,1000)
}
}

window.onload=beginrefresh
//-->
</script>
=====================================================




Eli -> RE: AUTO REFRESH (5/13/2003 11:09:24)

ok - forget the javascript - here' s an easier way:

in between the <head> </head> tags on your page that you want to refresh

<meta http-equiv=" pragma" content=" no-cache" >

it won' t refresh but it will stop the cache from working.




Eli -> RE: AUTO REFRESH (5/13/2003 11:13:59)

or you could try:

<% Response.CacheControl = " no-cache"  %>
<% Response.AddHeader " Pragma" , " no-cache"  %>
<% Response.Expires = -1 %>




nay27uk -> RE: AUTO REFRESH (5/13/2003 18:37:57)

Thanks kindly for the help.
the later pice of code did the trick grand.
THANKS
[:D][;)][:p][:)]




Eli -> RE: AUTO REFRESH (5/14/2003 4:37:55)


quote:

ORIGINAL: nay27uk

Thanks kindly for the help.
the later pice of code did the trick grand.
THANKS
[:D][;)][:p][:)]


no probs - glad to help[:D]




etfc1881 -> RE: AUTO REFRESH (11/20/2007 11:00:38)

That does work, but while we have used that we have come across a problem.

On the page that we have got the auto refresh on, we also have a music player as well, this means that when the page refreshes so does the music player.

Is there anyway that we can exclude the music player from being refreshed when the page does, is there a code for this at all???

Thanks in advance

Andy




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.078125