Jump to content

elmerdev30

Members
  • Posts

    8
  • Joined

  • Last visited

About elmerdev30

  • Birthday 07/09/1985

Contact Methods

  • Website URL
    http://getbite.io/

Profile Information

  • Interests
    Learn about html, javascript & css coding and apply it to my site.

elmerdev30's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Can you show me an example of a javascript for this? If it's not big enough of a request...
  2. Yes, I was told it is the frontpage. But I have placed the html for Facebook and Twitter buttons. It even showed the number of Facebook likes. So, I was thinking I could probably do that with the timer as well.
  3. What if I add a timer code in the "index.html" to update front page? I was told to only use plain ftp - important. The site is built using bootstrap css and fontawesome. Would it be possible to update the index.html with timer code?
  4. I just know a little about html or css. Learning a php language is a huge task and time consuming. I only need to learn about the timer, though. Specifically, the timer count up. Can you guys show me or give me an example using php or server side, or whatever that means? Pleeeaase.....
  5. Can you expound on how to do that? As I've said, I am new to css, html, etc. The website is built using bootstrap css and fontawesome, which I never have any idea. The developer only left me with that info and the ftp login. But now that you brought it up, I might as well search on how to store starting time on server side and study the php language. If you have may, perhaps, share a little info on how it should be done. Thanks.
  6. Hi dave, thank you for responding to my post. What I am actually trying to put here is a timer that counts up in hours, minutes and seconds. Say, for instance, by the time I click the 'Post' button to this reply, the time will begin to count up to (maximum) 24 hours, because I will be updating the site every single day. So, I know the gap in hours, minutes and seconds when the site was last updated. I admit the code was strange since I only added the minutes and hours based on the seconds, which is the original code I followed: ++totalSeconds; secondsLabel.innerHTML = pad(totalSeconds%60); minutesLabel.innerHTML = pad(parseInt(totalSeconds/60)); Based on that, I formulated the minutes and hours, which resulted to this: http://screencast.com/t/Sy44tLESatc Obviously, the hours never showed a number, except '00' and the minutes went to over 100 and counting. However, when I refresh the page, the numbers of minutes and seconds also restart. I don't want it to refresh when I refresh the page or even if I close it. I want the counting to continue until the next day. I am hoping that this code you formulated is correct. { 'use strict'; ++totalSeconds; secondsLabel.innerHTML = pad(totalSeconds%60); if (totalSeconds%60 == 0){ ++totalMinutes; minutesLabel.innerHTML = pad(totalMinutes%60); if (totalMinutes%60 == 0){ ++totalHours; hoursLabel.innerHTML = pad(totalHours); } } } The website is built using bootstrap css and fontawesome, which I never have any idea. The developer only left me ftp login. I was clueless what to do next, except to do google search, etc. Thanks to the tutorials at w3schools.com, I was able to find the timer tutorial and the members' posts on this forum. But I never found what I wanted so I created a new topic here. I don't know if I am allowed to put the site here so you'll know exactly what I mean. But, I think this screenshot As I've said, I don't have any background on css, javascript, or html. I just learned about the timer codes through the tutorials and other posts. So, I'm hoping to get some help. Please guys....
  7. Hi, I am new to html and css but I learned a thing or two through the tutorials. I am trying create a timer that indicates the last update of a post. So, the timer should count from 0 and stop when ever I update a new post. And, then, start the count again from 0. I was able to formulate one with the help of the tutorials, but I can't make it the way that I wanted. Instead, the timer automatically restarts when I refresh the page. Here's what I've made. I am not sure about the minutes and hours. <p id="p1">Last update: <label id="hours">00</label>:<label id="minutes">00</label>:<label id="seconds">00</label> <script type="text/javascript"> var hoursLabel = document.getElementById("hours"); var minutesLabel = document.getElementById("minutes"); var secondsLabel = document.getElementById("seconds"); var totalSeconds = 0; setInterval(setTime, 1000); function setTime() { ++totalSeconds; secondsLabel.innerHTML = pad(totalSeconds%60); minutesLabel.innerHTML = pad(parseInt(totalSeconds/60)); ++totalMinutes; minutesLabel.innerHTML = pad(totalMinutes%60); hoursLabel.innerHTML = pad(parseInt(totalMinutes/60)); ++totalHours; hoursLabel.innerHTML = pad(totalHours%24); hoursLabel.innerHTML = pad(parseInt(totalMinutes/60)); } function pad(val) { var valString = val + ""; if(valString.length < 2) { return "0" + valString; } else { return valString; } } </script></p> Could anyone help me out with how to make this not restart whenever the page is refreshed? I would really appreciate your help. Thanks.
  8. Hi, newbie here! I'm elmerdev30. I join this forum in order to know more about html or css languages. I never have any html or css background. I never even went to programming school. However, I am amazed at the websites my friends created. I tried to ask them myself if they could teach me but they only give me teach-you-later answers. Then, I came across w3schools tutorials. It's fun knowing and testing the html and/or css codes. I wish to be cognizant enough of this field, no matter how complex it is and how long it would take me to. cool stuff
×
×
  • Create New...