Forum Moderators: open
I have about a hundred safety procedures. Examples include "Hand Protection Requirements", "Fall Protection Requirements", "Eye Protection Requirements", "Protection From Chemicals", etc.
What I would like to have is a web page with a list of questions such as,
[]Will you be working with tools?
[]Will you be climbing above 4 feet?
[]Will you be grinding, sanding or buffing?
[]Will you be working with chemicals?
Each question will have a check box in front of it to indicate Yes. Each question will be associated with a document. At the bottom of the page will be a button. Upon checking yes to the questions and clicking the button, a list of the associated procedures will be returned. Each document list will have a link to the document.
So basically what I want to develop is a safety self-assessment tool so workers can answer questions about what they will be doing and it would return a list of the appropriate procedures we have.
Again, if someone can get me started with a working example of how you would do this, I can modify and add to for my needs.
I really appreciate any help.
Jim
I did not think about it until now, but if what I really want can't be done, an option would be to OPEN each document that is checked. I just want to make it easy as possible for our workers to get the safety information they need to minimize injuries in our workplace.
Also, I am open to other options if anyone can think of any.
Again, any help is appreciated very much.
Jim
[]Will you be working with tools? <a href="tools.pdf">Safe Tool Usage</a>
[]Will you be climbing above 4 feet? <a href="height.pdf">Working with height</a>
[]Will you be grinding, sanding or buffing? <a href="grinders.pdf">Grinders and Sanders</a>
[]Will you be working with chemicals? <a href="hazmat.pdf">Hazardous Materials Precautions</a>
Without sending something to the server side, not much you can do because Javascript will "lose" the values from one page to the next (you could set cookies, but that's more complex.) This will work (I think. :-) )
<input type="checkbox" name="tools" value="1"> Will you be working with tools?
.... etc.
<input type="button" onClick="openPages(this.form);" value="Open Documents">
function openPages(form) {
var flds = new Array('tools','height','grinders','hazmat');
for (i=0;i<flds.length;i++) {
var file = flds[i] . '.pdf';
var day = new Date(); // forces a newwindow to open for
var id = day.getTime(); // each win by creating unique ID for the name
var chk = eval('form.'+flds[i]);
if (chk.checked == true) {
var win = open(file,id,'width=500,height=500,scrollbars,resizable');
}
}
}