4 Replies Latest reply on Oct 12, 2007 5:55 AM by Anton Belevich

    Getting Javascript error A4J is undefined

    Michael Bedry Newbie

      I have setup the sample page as per the instructions in Developer guide using facelets in WebSphere 6 and when I execute the page in IE 7 I get a javascript error A4J is undefined.

      According to the pagesource

      <input type="text" name="_id22:_id23" onkeyup="A4J.AJAX.Submit('_viewRoot','_id22',event,{'actionUrl':'/WorkManagement/pages/maintainschedules/test1.xhtml','parameters':{'_id22:_id24':'_id22:_id24'} } )" size="50" />

      it is trying to execute A4J.AJAX.Submit js method which exits in AJAX.js and it is in the richfaces jar file.

      How do I get the xhtml page to find this file?

      Here is a copy of the sample xhtml file that I am trying to run.

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:pdc="http://pdc.can.ibm.com" xmlns:a4j="http://richfaces.org/a4j">

      <ui:define name="EPHScontentColumn">

      <f:loadBundle var="maintainSchedulesText"
      basename="com.ibm.pdc.ephs.workmanagement.nl.maintainSchedules.MaintainSchedulesBundle" />
      <f:loadBundle var="commonText"
      basename="com.ibm.pdc.ephs.workmanagement.nl.CommonBundle" />
      <hx:scriptCollector id="scriptCollector1">
      <h:inputText size="50" value="#{dataManager.text1}">
      <a4j:support event="onkeyup" reRender="rep" />
      <h:outputText value="#{dataManager.text1}" id="rep" />
      <!-- NOTE: Make sure to include this script AFTER the scriptCollector -->