12345678910111213141516171819202122232425 |
- const queryString = window.location.search;
- const urlParams = new URLSearchParams(queryString);
- const cbid = urlParams.get('cbid');
- document.getElementById("cbid").value = cbid;
- const workerID = urlParams.get('workerID');
- document.getElementById("workerID").value = workerID;
- function reloaded(rolle) { ////change test to reloaded with roles everywhere
- if (rolle == "MAB"){
- window.parent.location = "http://192.168.20.133:8080/PHP/forms/DTC.html?workerID=" + workerID;
- } else if (rolle == "VORB") {
- window.parent.location = "http://192.168.20.133:8080/PHP/forms/Vorb.html?workerID=" + workerID ;
- }
- }
- function checkTool(toolID_or,rolle){
- var toolID = document.getElementById('toolID').value;
- if (toolID != toolID_or && typeof toolID_or != 'undefined' ) {
- alert("check the tool. it should be "+ toolID_or+" !");
- } else {reloaded(rolle);}
- }
|