lightbox javascript show

UI Components for JSF
Post Reply
sebaxtz
Posts: 19
Joined: 08 Sep 2009, 20:38

01 Dec 2010, 15:26

Hi!... I'm stuck on stupid thing !!.. How can I show a lightbox by javascript ?

I could not found javascript methods, tried with show(), init, etc... all these raise js error...

thank you very much!

Code: Select all

            
<p:lightBox iframe="true"  width="80%" height="80%" widgetVar="libox" >
                <h:outputLink value="compPreview.jsf" >
                    <h:outputText value="2222"/>
                </h:outputLink>
        </p:lightBox>
<p:commandButton oncomplete="libox.init();"/>
cheers!!

jenscb
Posts: 21
Joined: 03 Apr 2010, 20:15

01 Dec 2010, 19:52

Hi,

try the following:

Code: Select all

<p:lightBox iframe="true"  width="80%" height="80%">
    <h:outputLink value="http://google.com" >
        <p:commandButton value="Link to google" />
    </h:outputLink>
</p:lightBox>
It seems, that the Link that makes the lightbox appear must be inside of it. Note that the Button itself doesn't do anything, the link surrounding it does the trick.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests