function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anand@SAASAnand@SAAS 

Javascript error in Ajax4JSF when using JQuery and page templates

I have a page template that has some JQuery code to display a tooltip (uses the SimpleTip jquery plugin). When I render the page template directly i see no javascript errors. When I call a page that uses the template and adds content to the template, I am seeing the below error:

 

 

Any idea what might be wrong ? The Javascript error prevents me from using an actionFunction that I have defined in the template. The action function works fine in Firefox and mozilla.

Anand@SAASAnand@SAAS

Additional information: I have a <apex:dataTable> in my vf page and if I remove the <apex:dataTable> the javascript error goes away.  

 

I'll post a simplified version of the page with JQuery in a subsequent comment.

Anand@SAASAnand@SAAS

 

<apex:page standardController="Account">
<apex:includeScript value="{!$Resource.JQuery}"/>
  <apex:pageBlock title="Viewing Contacts">
    <apex:pageBlockSection >
      <apex:dataTable var="a" value="{!Account.Contacts}" id="list">
        <apex:column ><apex:outputField value="{!a.Name}"/></apex:column>
        <apex:column value="{!a.Email}"/>
      </apex:dataTable>
    </apex:pageBlockSection>
  </apex:pageBlock>
</apex:page>

The above code snippet display the javascript error.

 

 

d3developerd3developer

Looks like you have a bunch of errors beyond that Javascript error related to the way your template is being used. Perhaps you could provide more code.

Anand@SAASAnand@SAAS

Those errors are not javascript errors but "errors" flagged by Chrome as non-conformat. For e.g., <meta> tag is not allowed anywhere other than in the <head>. The generated HTML for VForce pages has a <head> tag already and if I had <meta> tags in my VF page Chrome complains about it.

 

Use the VF sample page that I posted earlier to reproduce this error. That won't have the addtional errors in the screenshot and will only result in this javascript error.

hemmhemm

Did you ever figure out your issue?