0 Replies Latest reply on Sep 3, 2010 3:29 PM by mwhitis

    a4j:commandButton:onclick returns "data is not defined"

    mwhitis

      Hi,

       

      I'm trying to use the data element of an a4j:commandbutton to pass some JSON data to a javascript for processing before submitting the request fully.

       

      Section 5.6.6 of the Developer Guide seems to indicate that this is acceptable, but when I do, javascript throws an error: "element data is not defined".  However, when I change it to oncomplete, as is shown in some sample code (including in section 5.6.6), it works fine.

       

      Is the "data" attribute not available prior to the request being submitted?  The documentation seems to indicate that it would be, but seems like it's not.

       

      Thanks,

       

      Mike