Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 3 of 3
  1. #1

    Default How to display different things on different dates

    If you need to have a page on your website which shows different infomation on different dates on the week. Then heres the code.

    HTML Code:
    <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=160 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 frameborder=0 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>
    You will need to edit Saturday, Monday, Tuesday, Wednesday, Thursday, Friday & Sunday .htms to the pages you would like it to sho on them dates.
    "Moderator Please like OMGZZPP close dis forum 4 meee!!1"

    "He gave me like OMGZ A RED THINGY rep! so like omgz close this forum and ban him kkz?


    Quote by Dj-Kevin

    Lmao, who was I talking like? Perhaps Dj-Kevin

  2. #2
    Join Date
    Nov 2005
    Posts
    112
    Tokens
    0

    Default

    Nice + Rep

  3. #3
    Join Date
    Nov 2005
    Posts
    112
    Tokens
    0

    Default Couldnt edit

    I think this should be a stickied tut ( my opinion ) as its very helpful

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •