• BrightGen Stu
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

I have a strange Catch-22 situation that I have nailed down, and I do not have a resolution.  I am trying to implement the library:  http://www.ejschart.com into SalesForce.

 

I have it working fine with FireFox and Chrome, but having troubles with IE.  

 

Here is a very simple page:

 

<apex:page > <apex:stylesheet value="{!$Resource.c_ejschart}/EJSChart/EJSChart.css"/> <apex:includeScript value="{!$Resource.c_ejschart}/EJSChart/EJSChart.js"/> <div id="chart6" style="width:400px; height:150px;" class="chart" ></div> <script type="text/javascript"> var ch6 = new EJSC.Chart( "chart6"); ch6.addSeries( new EJSC.BarSeries( new EJSC.ArrayDataHandler( [["1",10],["2",9],["3",10]]))); </script> 

</apex:page> 

 

As you can see, I have zipped up the /dist dir of EJS, and uploaded it as a resource.

 

This code works fine and looks good in FireFox and Chrome.  However, in IE, I am getting a 5 consecutive Javascript errors in SalesForce code:

 

window.sfdcPage = new GenericSfdcPage(); (Microsoft JScript runtime error: 'GenericSfdcPage' is undefined)

new AppPicker('https://www.salesforce.com/appexchange', '/S (Microsoft JScript runtime error: 'AppPicker' is undefined) 

(Microsoft JScript runtime error: 'MenuButton' is undefined)  

(Microsoft JScript runtime error: 'Sidebar' is undefined)   

 

Then SF displays with the Graph looking good. 

 

 

Evidentially something in the EJS library is causing a conflict with the SF Javascript.   I tried putting the <script> for the EJSChart.js in the body of the page, but then EJS does not function in IE, it must be in the <head>.

 

So, here is my quandry:  I have to have EJS in the <head>, but it breaks the SF Javascript.

 

Any thoughts, or any experiences with this?

 

Thanks,

Steve