Hello,
Could you help, please?
My javascript isn’t running regularly. Can you write with jQuery language?
The rule are like in image below.
I am amateur and novice
My JS code
Would appreciate if you help
<script type="text/javascript">
function Checkit(theform) {
if(theform.task_name.value==true) {
error = "Please enter a short name of the task";
}
var taskname = document.getElementById('task_name').value;
if (taskname.length > 20){
error+="Please do not exceed 20 characters\n";
}
if(theform.week.value=="-1" && theform.day.value=="-1" && theform.hour.value=="-1" && theform.minute.value=="-1") {
error += "Please select a time when the times \n";
}
var filename = document.getElementById('file_name').value;
if (filename.length < 10){
error+="Enter file name of running local file or full URL\n";
}
if(error) {
alert('**These fields are required:**\n\n' + error);
error = "";
return false;
} else {
return true;
}
}
</script>
Thank you in advance
Best Regards