3 Replies Latest reply on Sep 27, 2007 6:34 AM by marc1

    calling regular javascript usinf richfaces?

    marc1

      any working sample on doing this right?

      thanks. marcelo

        • 1. Re: calling regular javascript usinf richfaces?
          maksimkaszynski

          Marcelo,
          please explain in detail what is that you need.

          • 2. Re: calling regular javascript usinf richfaces?
            tjakopec

             

            <h:graphicImage value="/pictures/icons/close.png" style="cursor:pointer"
             onclick="Richfaces.hideModalPanel('modalPanel')" />
            


            • 3. Re: calling regular javascript usinf richfaces?
              marc1

              OK, i think i found smthg that is working now. the following code:

              <head>
               <title>bla bla</title>
               <script src="./scripts/myscripts.js" type="text/javascript"/>
              </head>
              
              <h:commandLink immediate="true" style="cursor:pointer"
               actionListener="#{mybean.showpdf}">
               <h:graphicImage value="./Images/Adobe.gif" styleClass="simple" />
               <a4j:support event="onclick" onclick="javascript:mypopup()"/>
               </h:commandLink>
              
              


              wont work. that is, the .xhtml page aborts strangely when executing mypopup() and the actionlistener is never called.

              however, if i change the code for importing the js, like

              <f:view contentType="text/html">
              ..
              <a4j:loadScript src="./scripts/myscripts.js"/>
              ..
              


              then the javascript function mypopup will be called first, and then the <h.commandLink..> will be executed, as expected.

              BTW, im using the latest 3.1.1 snapshot

              marcelo