Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-960

a4j:commandButton oncomplete bug for IE6

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate Issue
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.1, 3.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Java 1.6
      GlassFish v2
      RichFaces v3.1.0 (release)

      Firefox 2.0.0.6
      IE 6.0.

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      <body>
      <script type="text/javascript" defer="defer">

      var globalNS = new Object();

      </script>

      <h:form id="TestForm">
      <a4j:commandButton id="testButton"
      onclick="this.disabled=true; globalNS.runButton=this;"
      value="Test"
      oncomplete="alert(globalNS);globalNS.runButton.disabled=false;"
      type="submit"/>
      </h:form>
      </body>

      Show
      <body> <script type="text/javascript" defer="defer"> var globalNS = new Object(); </script> <h:form id="TestForm"> <a4j:commandButton id="testButton" onclick="this.disabled=true; globalNS.runButton=this;" value="Test" oncomplete="alert(globalNS);globalNS.runButton.disabled=false;" type="submit"/> </h:form> </body>
    • Estimated Difficulty:
      Low

      Description

      The test case:

      <?xml version='1.0' encoding='utf-8'?>
      <jsp:root xmlns="http://www.w3.org/1999/xhtml"
      xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
      xmlns:rich="http://richfaces.ajax4jsf.org/rich">
      <f:view>
      <html>
      <jsp:output omit-xml-declaration="false" doctype-root-element="html"
      doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
      doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
      <jsp:directive.page contentType="text/html;charset=utf-8"/>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      </head>
      <body>
      <h:form id="TestForm">
      <a4j:commandButton id="testButton"
      onclick="this.disabled=true; runButton=this;"
      value="Test"
      oncomplete="alert(runButton);runButton.disabled=false;"
      type="submit"/>
      </h:form>
      </body>
      </html>
      </f:view>
      </jsp:root>

      For IE: The alert is executed but IE didn't see definition for runButton and JS errors are occured.
      For Firefox: The alert is successfully showed and JS console haven't any errors.

      For 3.0.1 and 3.1.0 RC3 this worked.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  akira_ag Abdulla Abdurakhmanov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: