My work group uses an HTML document that resides on our LAN. We also use a daily status document that I would like to be able to access from this page. I am trying to create a form containing three input boxes (YYYY, MM, DD) that the user can submit in order to open a document from a previous day. We use the following script to open the current document:
<script>
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var yyyy = date.getFullYear();
var yyyymmdd = yyyy.toString() + month.toString() + day.toString();
document.write("<font face='Verdana'><font color='#000066'><font size=-1><b><u><a href='L:/main/Status/" + yyyymmdd + ".xls' target='_blank'>Click Here For Today's Status</a></u></b>");
</script></td></tr>
Older documents are moved out of the 'Status' directory. For example, the document from March 15, 2004 would be
L:/main/Status/2004/2004_03/20040415.xls
<script>
var date = new Date();
var d = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var yyyy = date.getFullYear();
var yyyymmdd = yyyy.toString() + month.toString() + day.toString();
document.write("<font face='Verdana'><font color='#000066'><font size=-1><b><u><a href='L:/main/Status/" + yyyymmdd + ".xls' target='_blank'>Click Here For Today's Status</a></u></b>");
</script></td></tr>
Older documents are moved out of the 'Status' directory. For example, the document from March 15, 2004 would be
L:/main/Status/2004/2004_03/20040415.xls