evergrean100
Technical User
I am trying to validate all field names on a web page that have _theWord in the fieldname.
In the above I would need to fetch and validate:
ac_dajhta_theWord
ca_hereeds_theWord
cx_hserj_theWord
Please advise because my attempt is not working.
Code:
ac_dajhta_theWord
sd_dfdfe_fdfdv
ca_hereeds_theWord
se_dcvdfdef_dsfd
cx_hserj_theWord
In the above I would need to fetch and validate:
ac_dajhta_theWord
ca_hereeds_theWord
cx_hserj_theWord
Please advise because my attempt is not working.
Code:
fuction val()
{
var regexp = /_theWord/;
if(document.myform.name eq regexp)
{
if(document.myform.name == "")
{
alert("Field value is required")
}
}
}
<form name=myform action=goto.cfm onsubmit=return val();>
.....</form>