I have a piece of code (see below) that is supposed to hide a field on our website. See this thread here:
It works fine for the particular page that has the field on it, but all the other pages get an "Object Required" error because the script can't find it. Is there a way to prevent this? IE: have the script check to see if the field exists or not. I'm forced to put the script in the footer because this is a hosted page that I have limited access to.
document.getElementById('partner').style.display = 'none';