0
I have this mistake below:
I am trying to avoid this error by using the check below:
$(document).ready(function () {
if (document.getElementById('panelActivex') != null) {
document.getElementById('panelActivex').style.display = 'none';
document.getElementById('visitorImage').className = 'fld';
}
});
When I compile the code gets like this:
$(document).ready(function () {
document.getElementById('panelActivex').style.display = 'none';
document.getElementById('visitorImage').className = 'fld';
});
And it’s giving the print error. How do I fix it?
Why are you doing
document.getEl...
if you’re using jQuery?$('#panelActivex').css('display', 'none')
is much simpler and probably solves this problem– Costamilam
The element
panelActivex
exists or not on the page?– Sam
Opa. I’m going to test. Sorry but I’m not good at Javascript.
– fabricio_wm
I’ll check @Sam but I think there is.
– fabricio_wm
@Sam. It’s giving the same error. I’ve already cleared the cache and even restarted the machine. I put the function just like the one you posted but when I compile and arrive at the error search and the code displayed in VS2015 is the old one, as if I didn’t change anything. You know what could be causing this?
– fabricio_wm
This code change problem was Cache. Solved.
– fabricio_wm