I have one code like below of Rich PopupPanel.
Code:-
<rich:popupPanel id="simplePopup1" autosized="true" width="300"
height="60" moveable="true" resizeable="false" zindex="100"
onmaskclick="#{rich:component('simplePopup1')}.hide()">
<f:facet name="header">
<h: outputText value="Popup" />
</f:facet>
<f:facet name="controls">
<h: outputLink value="#"
onclick="#{rich:component('simplePopup1')}.hide(); return false;">
X
</h: outputLink>
</f:facet>
<a4j:region>
<a4j: outputPanel ajaxRendered="true">
<h:form ajaxSubmit="true">
<h:panelGrid columns="1">
<a4j:commandLink action="#{popupBean.eventHandler.onClose}"
value="close" immediate="true" />
</h:panelGrid>
</h:form>
</a4j: outputPanel>
</a4j:region>
</rich:popupPanel>
I am able to make this popup visible using the a4j:commandbutton. But instead of that, I want to show this popup window using the javascript code.
Anyone have any idea, how to achieve that.
I have been trying with below code but its not working.
<a4j: outputPanel>
<script type="text/javascript">
javascript:document.getElementById('simplePopup1').style.display = 'none'; //or javascript:rich:component('simplePopup1')}.show();
</script>
</a4j: outputPanel>
Note:- I am using RF4.0 and JSF2.0 with JBoss6.1 Thanks Jaikrat Singh
This?:
And possibly:
MAG, Milo van der Zee