On the "add record" form i would like to have the second date field([font="Courier New"]taxa_expira) to be calculated on the fly, after the first field its inserted (). I've tried the following code in the "[font="Courier New"]Javascript OnLoad event", but its not working. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=18030&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' /> (I'm using Simple edit box with datepicker)
var ctrlData = Runner.getControl(pageid, 'taxa_date'); var ctrlExpiry = Runner.getControl(pageid, 'taxa_expira');
function func() { if ( ctrlData.getDate()!='' && !isNaN(ctrlData.getDate())) ctrlExpira.setDate(ctrlData.getDate()+365); else ctrlExpira.setDate(''); }; ctrlData.on('keyup', func);