Is it possible to call a
java script and make a panel grid visible or hidden with out refreshing the page?
I tried using this way it reflects the entire page
<a4j:region>
<t:commandLink onclick="showpanel()">
<h:outputText styleClass="out" value="Sign In"/>
<a4j:support event="onclick" immediate="yes" ajaxSingle="true"> </a4j:support>
</t:commandLink>
<h:panelGrid id ="signInGrid" styleClass="signin" columns="4">
<h:outputText value="Username"/>
<h:inputText id="un" size="10" required="true"></h:inputText>
<h:outputText value = "Password" />
<h:inputSecret id="pwd" size="10" required="true"/>
<h:message for="un"></h:message>
<h:message for="pwd"></h:message>
<h:outputText value=""></h:outputText>
<h:commandButton value="Login"></h:commandButton>
</h:panelGrid>
</a4j:region>
where showpanel() containts document.getElementById("form:signInGrid").style.display='';
Please advice thanks in advance.
The core idea of the functionality is to show the username and passowr fields on click of sign in.