mcallaghan
IS-IT--Management
I have 2 fields on a page where one date field is automatically loaded when the screen is loaded with todays date the second field a user picks a date. I have a javascript that opens a calender and they choose a date. What I am looking for is if these 2 date are equal to put it in the check box. Can anyone please help me. It would be most appreciated.
<script type="text/javascript">
function CheckValue(this)
{
var A=document.getElementById("ProposedD")
var B=document.getElementById("Drequest")
If document.getElementById("ProposedD")==document.getElementById("Drequest");
document.getElementById("Emergency").checked=true;
}
</script>
<input name="Drequest" value="<%=Date()%>">
<p>Proposed Implementation Date: <input onclick="ds_sh(this)";onchange="CheckValue(this)"; name="ProposedD" readonly="readonly" style="cursor: text"/>
****************************************************
***the onclick="ds_sh(this)"; method just sets the calender date
*****************************************************
<p>Emergency Change Request: <input type="CHECKBOX" name="Emergency"></p>
Thanks
<script type="text/javascript">
function CheckValue(this)
{
var A=document.getElementById("ProposedD")
var B=document.getElementById("Drequest")
If document.getElementById("ProposedD")==document.getElementById("Drequest");
document.getElementById("Emergency").checked=true;
}
</script>
<input name="Drequest" value="<%=Date()%>">
<p>Proposed Implementation Date: <input onclick="ds_sh(this)";onchange="CheckValue(this)"; name="ProposedD" readonly="readonly" style="cursor: text"/>
****************************************************
***the onclick="ds_sh(this)"; method just sets the calender date
*****************************************************
<p>Emergency Change Request: <input type="CHECKBOX" name="Emergency"></p>
Thanks