HomeHome  
  • WelcomeWelcome  
  • Events  
  • PublicationsPublications  
  • FAQFAQ  
  • SearchSearch  
  • MemberlistMemberlist  
  • UsergroupsUsergroups  
  • RegisterRegister  
  • Log inLog in  
  • You are not connected. Please login or register


    Add a data variable

    avatar
    • Administrator

        Reputation : 315
        Registered on : 2012-02-22
        Posts : 2317
        School of codes courses: coming soon
      Add a data variable

      Description


      Write the actual time (Now) wherever you want...

      Set up


      First, go in your Javascript panel and add this code in all pages:
      Code:
      navvers = navigator.appVersion.substring(0,1);
      if (navvers > 3)
         navok = true;
      else
         navok = false;

      today = new Date;
      jour = today.getDay();
      numero = today.getDate();
      if (numero<10)
         numero = "0"+numero;
      mois = today.getMonth();
      if (navok)
         annee = today.getFullYear();
      else
         annee = today.getYear();
      TabJour = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
      TabMois = new Array("January","February","March","April","May","June","July","August","September","October","November","Dicember");
      messageDate = TabJour[jour] + " " + numero + " " + TabMois[mois] + " " + annee;

      Then you have to type this code where you want the data:
      Code:
      <script type="text/javascript">
      document.write(messageDate);
      </script>

      Technical problems


      The tutorial was tested on this forum and with the browser Google Chrome; This tutorial works for all the versions!

      Thanks, the staff
      For every problem or question please, contact us in the section Support for the tutorials, The staff will answer you as soon as it is possible...

      Friendly,
      The team of the Forum of Codes.



      Niko wants you in the team Guest

      Community manager and Administrator at Forumattivo.com

      avatar
      • Veteran staff member

          Reputation : 7
          Registered on : 2012-06-26
          Posts : 108
        what does this means?

        avatar
        • ****


            Reputation : 2
            Registered on : 2012-05-19
            Posts : 52
          Can you provide a demo?


          YOUR BANNER HERE
          728x90
          DMCA.com Protection Status
          Make a forum | © PunBB | Free forum support | Contact | Report an abuse | Free forum