2 Replies Latest reply on Sep 17, 2008 9:50 AM by lee64

    iframe problem

    lee64

      Hi,
      I use iframe in a page like this:

      top frame:

      ...
      <h:panelGroup id="sayHello">
      .....
      <h:panelGroup>
      ...
      


      frames[1]:
      ...
      <a4j:commandButton action="#{user.loginAction()}">
      ...
      


      target:
      Press the button,rerender the part "sayHello".

      when in same ifram,that will be easy.But now,hao to deal with it?
      Any body help?

      Great thanks!
      Lee

        • 1. Re: iframe problem
          nbelaevski

          Hello,

          Try to use a4j:jsFunction to declare function that'll invoke action or re-render something in iframe A and then call it from another location like this:

          top window:

          <iframe src="cdh.htm" id="abc"></iframe>
          
           <a href="javascript:document.getElementById('abc').contentWindow.abc()">click</a>
          


          iframe A:

          <script>
           function abc() {
           alert('abc');
           }
           </script>
          
           <a4j:jsFunction name="abc1" reRender="..." ...>
          


          • 2. Re: iframe problem
            lee64

            It's helpful!
            Thank you!