Jump to content
Software FX Community

Issues with SFX_SendUserCallback with multiple Charts in Sharepoint 2007


Recommended Posts

Posted

Team,

 I seem to be having an issue using the SFX_SendUserCallback function in JS when there are multiple charts on the same page. I'm using ChartFX in a web part hosted in Sharepoint 2007. I've got 2 web parts on the same page that use this function. I'm able to send in a unique chart ID for each call but I can't seem to get data for the second chart on the page to work correctly. This is namely because the SFX_SendUserCallback is repeated twice on the page - Once for each chart. So my JavaScript is not calling the right SFX_SendUserCallback instance...

 Any idea how to get around this?

Posted

1) There should only one definition for SFX_SendUserCallback

2) SFX_SendUserCallback is asynchronous and you cannot make a second call untill the first one is completed. If you need to make two calles you have to "chain them", that is to set it up so that the second call gets initiated AFTER the first call returns from the server. For example:

SFX_onCallbackReadyDelegate = function (context, result)  {

  SFX_processing = false;

  SFX_SendUserCallback ('chart1',...); // Call the second time (for chart2) AFTER the first call is done.

};

SFX_SendUserCallback ('chart1',...);

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...