Hi have this script:
Expand|Select|Wrap|Line Numbers
- <script language="javascript" type="text/javascript">
- <!--
- var fieldNames = new Array("IRE", "ISI", "IMI", "REL", "REV", "MAN", "SOP", "GUF", "FOR", "VAS");
- function loaded()
- {
- var tm, q = location.href.indexOf("?tm=");
- if (q < 0 || (tm = location.href.substr(q + 4)).length <= 0) return;
- tm = tm.split(";");
- var frmObj = document.timeForm;
- var re = /^([a-z]+)-(([01]\d|2[0-3]):[0-5]\d)$/;
- for ( var n = 0 ; n < tm.length ; n++ )
- {
- var rt = tm[n].match(re);
- if (rt && typeof(frmObj[rt[1]]) != "undefined")
- {
- frmObj[rt[1]].value = rt[2];
- }
- }
- }
- function unloading()
- {
- if (window.opener == null) return;
- window.opener.popupWin = null;
- }
- function updateTime(txtObj)
- {
- if (window.opener == null) return;
- var re = /^([01]\d|2[0-3]):[0-5]\d$/;
- if (txtObj.value.length >= 5 && !txtObj.value.match(re))
- {
- alert("Inserire l'orario nel formato 'hh:mm'.");
- txtObj.focus();
- }
- var frmObj = txtObj.form;
- var elems = frmObj.elements;
- var result = "";
- var destObj = window.opener.document.myform.impiego;
- {
- for ( var n = 0 ; n < elems.length ; n++ )
- {
- if (elems[n].type == "text" && elems[n].value.match(re))
- {
- if (result.length) result += ";";
- result += elems[n].name + "-" + elems[n].value;
- }
- }
- destObj.value= result;
- }
- else destObj.value= "--:--";
- }
- // -->
- </script>
To perform control schedule.
That is schedule no superior to 7 hours and 36 minutes.
For example:
1) In the field of the form "IRE" inserted 08:00... this value is superior to 7:36
Its' wrong !!!!
2) In the field of the form "IRE" inserted 04:00 and in the field of the form "ISI" inserted 04:00.... this value is superior to 7:36
Its' wrong !!!!
Help me please, regards
viki1967