Jump to content

HTML update form


tjburdette

Recommended Posts

I have a script at my work that I'm using to display the facility safety acknowledgements. I'm displaying how many days it's been since a first aid event, a recordable, disabling, etc.... I have it all working and displaying to little smart monitors out front. It is working. So my question is how can I build a form to update it when something does happen? I have to manually update it right now through the code but the HR ladies up front won't be able to do that. Here is the code for one of the images that I'm displaying. All I need is a form that will connect to this document basically. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Pendleton Finishing Plant - First Aid Days</title> <style type="text/css"> /* pendleton finishing circle image */ #imgFirstaid { position: absolute; top: 10px; left: 110px; z-index: 0; } /* large xx of days in the center of the circle */ #strFirstaid{ width: 579px; height: 579px; text-align: center; margin-top: 125px; position: absolute; top: 25px; left: 115px; z-index: 0; font-family: calibri; font-weight: bold; font-size: 250px; color: #403152; } /* small date at the bottom of the circle */ #txtFirstaid{ width: 579px; height: 579px; text-align: center; margin-top: 365px; position: absolute; top: 25px; left: 115px; z-index: 0; font-family: calibri; font-size: 28px; color: #403152; } </style> <script> function GetFirstaid(){ var then = new Date(2012, 7, 16), // month is zero based, i.e. jan = 0 now = new Date; // no arguments -> current date // 24 hours, 60 minutes, 60 seconds, 1000 milliseconds out=Math.abs((now - then) / (1000 * 60 * 60 * 24)); // round the amount of days rou=Math.round(out) document.getElementById('strFirstaid').innerHTML=rou; } window.onload=function(){GetFirstaid();}//call when everything has loaded </script> </head> <body> <div id="imgFirstaid"><img src="../images/lg-f.png" /></div> <div id="strFirstaid"></div> <div id="txtFirstaid">_____________________ <br />8/16/2012</div> <!-- enter the date as normal --> </body></html>

Link to comment
Share on other sites

In order for something to automatically update, you would need to have the information in question in a place of persistent storage (like a DB). The page to display this information would always look to the DB to display. From there, you can either manually update the DB yourself, or write a form that submits to a script that does the DB updating for you.

Link to comment
Share on other sites

I'm displaying how many days it's been since a first aid event, a recordable, disabling, etc.[...] I have it all working and displaying to little smart monitors out front.
Little smart monitors? What are you talking about? Is this a website or not?
Link to comment
Share on other sites

It already works as it is. Currently there is no form to make it user friendly. I did succeed in building the same thing in access but it doesn't have to farmatting propertied that I need here. I just need a form that will update the information that's all. Here is a screenshot of one of the outputs. Like I said this already works right now. It's just that when something does happen and the date needs updating, I have to do it in the code and I want a form to do it for me. That way I can let the hr people do it themselves.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...