This handy little updater comes from Dynamic Drive DHTML Scripts-Daily IFrame. When you visit them for the code and you would like to use an Optional Auto Resize IFrame add-on, there is an additional code on that page also.
For this page we use the Sunday threw Saturday one.
This one will change daily at Midnight.
<!--
<script language="JavaScript1.2">
//Daily iframe content- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, and Terms Of use, visit http://dynamicdrive.com
//This credit MUST stay intact for use
var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1
var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1
//Specify IFRAME display attributes
var iframeprops='width=150 height=150 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"'
//Specify 7 URLs to display inside iframe, one for each day of week
var daycontent=new Array()
daycontent[1]="monday.htm" //Monday content
daycontent[2]="tuesday.htm" //Tuesday content
daycontent[3]="wednesday.htm"
daycontent[4]="thursday.htm"
daycontent[5]="friday.htm"
daycontent[6]="saturday.htm"
daycontent[0]="sunday.htm"
//No need to edit after here
if (ie||dom)
document.write('<iframe id="dynstuff" src="" '+iframeprops+'></iframe>')
var mydate=new Date()
var mytoday=mydate.getDay()
function dayofweek_iframe(){
if (ie||dom){
var iframeobj=document.getElementById? document.getElementById("dynstuff") : document.all.dynstuff
iframeobj.src=daycontent[mytoday]
}
}
window.onload=dayofweek_iframe
</script>
-->
Again it's for demonstration purposes and if you need this code go to Dynamic Drive for code.
<!--
<script type="text/javascript">
/***********************************************
* Daily iframe content II- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
var ie=document.all
var dom=document.getElementById
//Specify IFRAME display attributes
var iframeprops='width=150 height=150 marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"'
//Specify 31 URLs to display inside iframe, one for each day of the current month
//If this month has less than 31 days, the last few URLs won't be used.
var daycontent=new Array()
daycontent[1]="1.htm"
daycontent[2]="2.htm"
daycontent[3]="3.htm"
daycontent[4]="4.htm"
daycontent[5]="5.htm"
daycontent[6]="6.htm"
daycontent[7]="7.htm"
daycontent[8]="8.htm"
daycontent[9]="9.htm"
daycontent[10]="10.htm"
daycontent[11]="11.htm"
daycontent[12]="12.htm"
daycontent[13]="13.htm"
daycontent[14]="14.htm"
daycontent[15]="15.htm"
daycontent[16]="16.htm"
daycontent[17]="17.htm"
daycontent[18]="18.htm"
daycontent[19]="19.htm"
daycontent[20]="20.htm"
daycontent[21]="21.htm"
daycontent[22]="22.htm"
daycontent[23]="23.htm"
daycontent[24]="24.htm"
daycontent[25]="25.htm"
daycontent[26]="26.htm"
daycontent[27]="27.htm"
daycontent[28]="28.htm"
daycontent[29]="29.htm"
daycontent[30]="30.htm"
daycontent[31]="31.htm"
//No need to edit after here
if (ie||dom)
document.write('<iframe id="dynstuff" src="" '+iframeprops+'></iframe>')
var mydate=new Date()
var mytoday=mydate.getDate()
function dayofmonth_iframe(){
if (ie||dom){
var iframeobj=document.getElementById? document.getElementById("dynstuff") : document.all.dynstuff
iframeobj.src=daycontent[mytoday]
}
}
window.onload=dayofmonth_iframe
</script>
-->