Hello - I need help in improving the JS code below. I would like to add data validation upon updating a record via In line Edit in a Tabular form. Any feedback is much appreciated.
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
NeoInJS
Hello - I need help in improving the JS code below. I would like to add data validation upon updating a record via In line Edit in a Tabular form. Any feedback is much appreciated.
<script>
document.getElementById("Mod0InlineEdit").onclick = function() {
window.alert("check");
if(document.getElementsByName("Mod0InlineEdit")[0].value > 100 {
window.alert("save!");
}
else if (document.getElementsByName("Mod0InlineEdit")[0].value > 1000 {
window.alert("do not save!");
return false;
}
else {
window.alert("do not save!");
return false;
}
}
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.