简体   繁体   中英

Legacy FBJS causing errors

I'm having trouble with some old legacy FBJS. To validate the value of a field I was using

document.getElementById('email2').getValue()

This is now giving me the error

Error: a197943730232760_document.getElementById("email2") is null

I'm getting this for any other fields, getChecked() is also failing. I can't seem to find any other problems and this has only stopped working.

Any help would be appreciated.

I'm not sure this looks like a FBJS problem. Check you do actually have an element with the ID 'email2', from the sounds of that error message, your page doesn't have an 'email2' at all, which is why it can't get the value.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM