I have a check box:
<tr><td class="form-row" colspan="2" style="font-weight:bold; font-size:10px; color: #006699;"> <a href="javascript:void(0);"></a>
<label> Display Value</label>
<input type="checkbox" name="Display" id="Display" />
</td></tr>
Based on the onload function, i need to show/hide the checkbox completely.
window.onload = function (e) {
var dateOfToday = getCurrentDay();
var presentDate = document.getElementById("presentDate");
if (presentDate) {
presentDate.value = dateOfToday;
}
var datetiMe = "<%= session.getAttribute("PresetValEndDate")%>";
var setPVInput = formatDate(datetiMe);
if (setPVInput > dateOfToday || setPVInput == dateOfToday){
document.getElementById("myFieldset").disabled = false;
//hidecheckbox
}
else(setPVInput < dateOfToday)
{
document.getElementById("myFieldset").disabled = true;
//show checkbox
}
}
I tried the following but it didn't work.
document.getElementById("Display").disabled = false;
Any help is appreciated. Thank you.
Aucun commentaire:
Enregistrer un commentaire