3 Replies Latest reply on Oct 22, 2008 6:00 AM by Nick Belaevski

    Reloading h:form using ajax not wroking with Firefox

    Anton Polyakov Newbie

      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:

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

      '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?