Sign in to follow this  
rwuhrman

Cannot make JavaScript aware of FusionMaps in SharePoint

Recommended Posts

Hi All,

I'm not able to make javascript aware of my FusionMaps in SharePoint.  I've no problems making javascript aware of FusionCharts though.

Also, taking the same code that I'm using in SharePoint works fine when taken outside of sharepoint.  When one references elements in a web part via javascript you need to use getElementById.  After some extensive testing, I'm suspecting that FusionCharts.js is doing a better job of this than FusionMaps.js. 

Has anyone else run into this problem of making javascript aware of the maps per the instructions in SharePoint web parts?

Thanks in advance.

Share this post


Link to post
Share on other sites

Hey guys, I want you to know that I fixed this problem in my SharePoint environment.  If infosoft folks want the fix let me know, but basically it was as simple as grabbing some code from FusionCharts.js and copying it into FusionMaps.js.  It was a simple matter of copying this code:

 

//Added <FORM> compatibility

//Check if it's added in Mozilla embed array or if already exits

if(!document.embeds[this.getAttribute('id')] && !window[this.getAttribute('id')])

window[

this.getAttribute('id')]=document.getElementById(this.getAttribute('id'));

//or else document.forms[formName/formIndex][chartId]

I also copied in the  (mobile IE < 5) code but I'm not sure if I neede that or not.  It's working now so I'm not messing with it.

Thanks for such a great product.  You know you guys have done a good job when someone else can come in and literally copy and paste a few lines of code from the .js of one product to fix the .js (FusionCharts) in another product (FusionMaps) with very little troubles and fix their own problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this