Skip to content

Commit

Permalink
Updated the form validation method with ID's parameter submited by th…
Browse files Browse the repository at this point in the history
…e ets.
  • Loading branch information
Keshav Nangare committed Dec 20, 2018
1 parent 414e356 commit 786e8f3
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions teamengine-web/src/main/webapp/test.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ if (mode.equals("retest") || mode.equals("resume") || mode.equals("cache")) {
window.location = url + "&stop=" + stop + "&t=" + d.getTime();
}
function validation() {
// Validate the inputs.
function validateIutInputs() {
var iuturi = window.frames[1].window.document.forms[0].elements.iut_uri.value;
var iutdoc = window.frames[1].window.document.forms[0].elements.iut_doc.value;
if ((iutdoc == undefined || iutdoc == null || iutdoc == "")
Expand All @@ -178,10 +179,17 @@ if (mode.equals("retest") || mode.equals("resume") || mode.equals("cache")) {
window.frames[1].window.document.forms[0].elements.iut_uri.focus();
return false;
}
if (iutdoc !== undefined && iutdoc !== null && iutdoc !== "") {
window.frames[1].window.document.forms[0].elements.iut_uri.value = "";
}
}
// Reset iut_uri if the file is uploaded.
function resetIutValue(iut_uri, iut_doc){
var iut_uri_value = window.frames[1].window.document.getElementById(iut_uri).value;
var iut_doc_value = window.frames[1].window.document.getElementById(iut_doc).value;
if (iut_doc_value !== undefined && iut_doc_value !== null && iut_doc_value !== "") {
window.frames[1].window.document.getElementById(iut_uri).value = "";
}
}
</script>
</head>
<frameset onload="start()" rows="102,*">
Expand Down

0 comments on commit 786e8f3

Please sign in to comment.