Hi Everyone,
I am working with an online form management system. I have tried to access Support for help, but I have not got a response from them. Throughout the years, the people at WebDesignForums.net have always been a big help, and I assume someone on this board can help me.
With that said, here is my issue:
I am using javascript to pre-populate a form on a field based on another field's value. The form management system does not allow me access the input tag and add the "onkeyup" function. Is there any way I can remotely attribute this function to the field within the javascript code instead of the input tag?
Here is the script I am using (I am pre-populating an age (ID: AGE) field based on the date of birth (ID: DOB) field someone fills out:
Let me know if it is possible. Thanks!Code:<script type="text/javascript"> function DOBcalc() { var DOBmdy = (document.getElementById('DOB').value).split('/'); Bdate = new Date(DOBmdy[2],DOBmdy[0]-1,DOBmdy[1]); BDateArr = (''+Bdate).split(' '); document.getElementById('DOW').value = BDateArr[0]; Cdate = new Date; CDateArr = (''+Cdate).split(" "); Age = CDateArr[3] - BDateArr[3]; document.getElementById('AGE').value = Age; } </script>