I'm using the code below :
<apex:outputPanel id="myID" style="display: none;">
...
</apex:outputPanel>
<apex:commandButton value="Display" onclick="display()"/>
<script type="text/javascript">
function display() {
document.getElementById('{!$Component.myID}').style.display = 'block';
}
</script>
This code works fine with Firefox but not with IE, Safari or Chrome.
I found that Doctype
may be the problem but I don't know how to solve this issue.
I tried to add doctype
attribute on <apex:page>
tag but it doesn't work.
style.display = "block";
'
. I updated my post. @AtulRajguru9 : nothing ! And if I manually set thedisplay: 'block'
in the console, my panel appears.