Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Writing HTML to a TXT document.


  • Please log in to reply
1 reply to this topic

#1 Steakboy

Steakboy

  • Members
  • 22 posts
  • OFFLINE
  •  
  • Local time:07:28 AM

Posted 16 May 2017 - 10:19 AM

So i found a nice Count Down timer that i want to use to keep track of times. But there is a couple of things i need to add to it that i am unaware of how to do. I pulled the files from here: https://github.com/wesbos/JavaScript30/tree/master/29%20-%20Countdown%20Timer 

I modified it a little bit, as such:

 

<body>
  <div class="timer">
    <div class="timer__controls">
      <button data-time="900" class="timer__button">15 Minute Break</button>
      <button data-time="1800" class="timer__button">30 Minute Lunch</button>
      <form name="customForm" id="custom">
        <input type="text" name="name" placeholder="Enter Your Full Name">
      </form>
    </div>
    <div class="display">
      <h1 class="display__time-left"></h1>
      <p class="display__end-time"></p>
  </div></div>
  <script src="scripts-FINISHED.js"></script>
 
</body>
//
All i changed was take away all buttons except 15min and 30 minutes. AND i changed the customer timer slot to have a "Enter Your Full Name".
 
1. What i need it to do now is instead of having "enter your full name" I would like it to have a drop down with a list of all employees in my office.
 
2. Also i need the timer to continue down into the negatives, UNTIL you click a button that says "lunch over" or "Break over"
 
3. Then once they click that button i need it to write information to a TXT file. The information is (A) what they selected as the employee name (B) what time and date they clicked the first button © whether it was a 15min or 30 min (D) What time they came back in.
 
After that i can do all the styling my self. Any body know how i can accomplish this?


BC AdBot (Login to Remove)

 


#2 Steakboy

Steakboy
  • Topic Starter

  • Members
  • 22 posts
  • OFFLINE
  •  
  • Local time:07:28 AM

Posted 16 May 2017 - 10:27 AM

So i got the drop down part working:

 

<body>
  <div class="timer">
    <div class="timer__controls">
      <button data-time="900" class="timer__button">15 Minute Break</button>
      <button data-time="1800" class="timer__button">30 Minute Lunch</button>
      <div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Dropdown</button>
 <div id="myDropdown" class="dropdown-content">
   <a href="#employee">Morgan</a>
   <a href="#employee">Benjamin</a>
   <a href="#employee">Xander</a>
   <a href="#employee">Cole</a>
<a href="#employee">Jaci</a>
<a href="#employee">Jason</a>
 
 </div>
</div>
    </div>
    <div class="display">
      <h1 class="display__time-left"></h1>
      <p class="display__end-time"></p>
  </div></div>
   
  <script src="scripts-FINISHED.js"></script>
 
</body>
 
now just writing to the TXT file, and having a stop button.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users