home *** CD-ROM | disk | FTP | other *** search
- <ccResource>
- <ccTitle>
- Refresh Timer
- </ccTitle>
- <ccCategory>
- Browser
- </ccCategory>
- <ccDescription>
- This script will show the time the user has left before the page will refresh in the status bar. Only works in Internet Explorer
- </ccDescription>
- <ccInstructions>
- The code goes only inside the BODY tags. You can change the items below to suit your needs.
- </ccInstructions>
- <ccHeadContent>
-
- </ccHeadContent>
- <ccBodyContent>
- <script>
-
- //refresh time is in "minutes:seconds"
- var timer="0:30"
-
- if (document.images){
- var CoffeeParse=timer.split(":")
- CoffeeParse=CoffeeParse[0]*60+CoffeeParse[1]*1
- }
- function refreshtime(){
- if (!document.images)
- return
- if (CoffeeParse==1)
- window.location.reload()
- else{
- CoffeeParse-=1
- currentminutes=Math.floor(CoffeeParse/60)
- currentsec=CoffeeParse%60
- if (currentminutes!=0)
- currenttime=currentminutes+" minutes and "+currentsec+" seconds until page refresh!"
- else
- currenttime=currentsec+" seconds left until page refresh!"
- window.status=currenttime
- setTimeout("refreshtime()",1000)
- }
- }
-
- window.onload=refreshtime
- //-->
- </script>
-
- </ccBodyContent>
- <ccElementContent>
-
- <ccElementName></ccElementName>
- <ccElementAction></ccElementAction>
-
- </ccElementContent>
- <ccExtraData>
-
- </ccExtraData>
- </ccResource>
-