Arggh, Still not working.
Is this a limitation of Cold Fusion validation(or my programming skills)? I have been trying for some time to use an JS onfocus call from a cfinput tag
In the cfinput, if a user does not enter a surname, a message will pop up telling the user to enter a valid surname based on my validate tag. cfinput does not hve tag to do an onfocus, so I used onerror to call a JS function which should set the focus on that input. I can get around this by changing the cfinput tag to an input tag then using an onfoucs, but I would like to avoid doing this. I have tried lots of combinations to get this to work but no luck. Anyone have any ideas?
function checkform2() {
document.individual_registration_processing.surname.focus();
}
<cfinput type="text" name="surname" size="20" required="yes" Message="Please enter a valid surname" onerror="return checkform2()"></td>
Is this a limitation of Cold Fusion validation(or my programming skills)? I have been trying for some time to use an JS onfocus call from a cfinput tag
In the cfinput, if a user does not enter a surname, a message will pop up telling the user to enter a valid surname based on my validate tag. cfinput does not hve tag to do an onfocus, so I used onerror to call a JS function which should set the focus on that input. I can get around this by changing the cfinput tag to an input tag then using an onfoucs, but I would like to avoid doing this. I have tried lots of combinations to get this to work but no luck. Anyone have any ideas?
function checkform2() {
document.individual_registration_processing.surname.focus();
}
<cfinput type="text" name="surname" size="20" required="yes" Message="Please enter a valid surname" onerror="return checkform2()"></td>