Good evening to all!!!
I have a form in which i input age using the code:
I have to display the age automatically besides it once the year is entered (as a label). How can that be done?
I tried creating a function like:
I used dob_year because that is the id the field gets on executing the couch code and converting it into html.
please advise.
Regards,
GenXCoders
I have a form in which i input age using the code:
- Code: Select all
<cms:input name="dob" id="dob" type="datetime" class="input" required='1' />
I have to display the age automatically besides it once the year is entered (as a label). How can that be done?
I tried creating a function like:
- Code: Select all
document.getElementById("dob_year").addEventListener("blur", myFunction);
function myFunction() {
document.getElementById("dob_year").innerHTML = "<cms:show frm_dob_year />";
}
I used dob_year because that is the id the field gets on executing the couch code and converting it into html.
please advise.
Regards,
GenXCoders