Hi
I am not good in java script, just to let everybody know
But why will the below code not work ?
If I remove the else part then the code works, but if I add the else part then the whole thing does not work.. any ideas ?
function checkIfComplete(str) {
if (str=="06) Completed") {
document.getElementById('CalVal4').readOnly=false;
document.getElementById('CalVal4').className="";
var dt = new Date();
var today = (dt.getDate()<10?"0"+dt.getDate():dt.getDate())+"-";
today += (dt.getMonth()<9?"0"+(dt.getMonth()+1)dt.getMonth()+1))+"-";
today += dt.getFullYear();
document.getElementById('CalVal4').value=today;
document.getElementById('CalVal4Fake').value=parseDateM(today);
document.getElementById('CalBtn4').style.display='inline';
}
Else {
alert(str);
}
}
I am not good in java script, just to let everybody know
But why will the below code not work ?
If I remove the else part then the code works, but if I add the else part then the whole thing does not work.. any ideas ?
function checkIfComplete(str) {
if (str=="06) Completed") {
document.getElementById('CalVal4').readOnly=false;
document.getElementById('CalVal4').className="";
var dt = new Date();
var today = (dt.getDate()<10?"0"+dt.getDate():dt.getDate())+"-";
today += (dt.getMonth()<9?"0"+(dt.getMonth()+1)dt.getMonth()+1))+"-";
today += dt.getFullYear();
document.getElementById('CalVal4').value=today;
document.getElementById('CalVal4Fake').value=parseDateM(today);
document.getElementById('CalBtn4').style.display='inline';
}
Else {
alert(str);
}
}