Inside a popup,
 
<h:commandButton value="Close" />
 
This will close the parent window, not only the popup. Is there a way to close popup only?
 
Thanks!
 
[EMAIL PROTECTED] wrote:
Or you can use server-side handler of this button to close your popup, something like this:
 
JSF page:
 
<!-- js code will be rendered here -->
<h:outputText escape="false" value="<script type=\"text/_javascript_\" language=\"_javascript_\"#{bean.jsCode}</script>"
<h:commandButton action="">
 
Java code:
 
public void doSubmit() {
  // do something
  ¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­..
  // close popup
  setJsCode(¡°window.close();¡±);
}
 
Best regards,
Yura.
 
-----Original Message-----
From: Dennis Byrne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 28, 2006 10:38 AM
To: MyFaces Discussion
Subject: Re: How to close popup using a button
 
Use window.close();
 
;)
 
Dennis Byrne
 
>-----Original Message-----
>From: Dave [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, March 28, 2006 02:28 AM
>Subject: How to close popup using a button
> 
>I like to add a  <commandbutton> (Close)&nb sp; in a popup, how to close the popup when user click the button? Thanks!
> 
>          
>---------------------------------
>New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates.
 


New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

Reply via email to