3 Replies Latest reply on Oct 22, 2008 3:26 PM by apolyakov

    Reloading h:form using ajax not wroking with Firefox

    apolyakov

      Hi All!


      I have a very frustrating problem with Seam 2.0.2SP1. I want to re-render pane which have h:form included. After re-rendering, FF doesn't see the form in 'document.forms' and hence this form can't submit any actions. The following code works fine in IE, but not in FF, please advice:


      <f:view>
           <script language="javascript">
            //<![CDATA[
            function check() {
                 //document.forms['testForm'] = document.getElementById('testForm');
                alert(document.forms['testForm']);
           }
           //]]>
           </script>
      
           <h:form>
                <a4j:commandLink id="weekCmdLink" value="Week"
                     reRender="scheduleCalendar">
                     <a4j:actionparam id="dataParamWeek" name="data" value="WEEK"
                          assignTo="#{testBean.data}" />
                </a4j:commandLink>
                <s:button onclick='check(); return false;' />
           </h:form>
      
           <h:panelGrid columns="1" id="scheduleCalendar">
                <h:outputText value="#{testBean.data}" />
                <h:form id="testForm">
                     <h:commandLink id="yearCmdLink" value="Action!"
                          action="#{testBean.someAction}" />
                </h:form>
           </h:panelGrid>
           <a4j:log popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
      </f:view>
      


      'Action!' button works fine until you click on 'Week' link. After that clicking on

      <s:button onclick='check(); return false;' />

      doesn't show form is present in FF and 'Action!' button also results in JS error 'form is null' in FF.


      Seems like a DOM problem in FF. Any ideas?