0 Replies Latest reply on Sep 27, 2007 8:39 AM by Andre Rodrigues

    Problems with a4j:support oncomplete in Internet Explorer

    Andre Rodrigues Newbie

      Hi,

      I have three check boxes in my page. Each time the user change the value of a check box, a value change listener is notified enabling or disabling a corresponding text field and it's validations. This is all done with a4j:support:

      <t:selectOneRadio value="#{someBean.someValue}" layout="spread" required="true" immediate="true" valueChangeListener="#{someBean.changedValue}">
       <f:selectItem id="itm1" itemLabel="Check Box 1" itemValue="0" />
       <f:selectItem id="itm2" itemLabel="Check Box 2" itemValue="1" />
       <f:selectItem id="itm3" itemLabel="Check Box 3" itemValue="2" />
       <a4j:support event="onchange" reRender="textfields" oncomplete="focusTextField()" />
      </t:selectOneRadio>
      


      The javascript function focusTextField() decides which text field receives focus after the ajax request is complete.
      Everything works fine in firefox, but when using Internet Explorer (6.0 or 7.0) the text field does not gain focus (it actually gain focus, but looses right after).
      Does anyone have a work around this problem? I'm really starting to lose my mind trying to fix this... :-)
      I'm using Richfaces 3.1 and MyFaces 1.1.5 in Tomcat 5.x.

      Thanks a lot,

      André Rodrigues