Hi,
i am trying to deduct 35 days from a date entered by the user. I have 2 text fields named
txtDM & txtKickIn
what I want is that when the user enters a date in txtDM then onChange txtKickin will display that date minus 35
This is the code I am trying to use at the moment but i get "NaN" in txtKickIn
and then this for the onChange
any help would be appreciated
Regards
Paul
i am trying to deduct 35 days from a date entered by the user. I have 2 text fields named
txtDM & txtKickIn
what I want is that when the user enters a date in txtDM then onChange txtKickin will display that date minus 35
This is the code I am trying to use at the moment but i get "NaN" in txtKickIn
Code:
<script>
function KickIn(){
var txtDM=document.getElementById("txtDM")
var txtKickIn=document.getElementById("txtKickIn")
var NoDays = 35
txtKickIn.value = txtDM - NoDays;
}
</script>
and then this for the onChange
Code:
onChange="KickIn();"
any help would be appreciated
Regards
Paul