JSAPI through AJAX/ASYNC call

Enrico Patarini shared this question 17 months ago
Answered

Hello,

I am trying to dynamically load yellowfin content onto a page based on selections by a user (i.e. a list of reports. if the user clicks report #2 in the list that populates into a box on the page). It appears the javascript uses "document.write" which is not a valid function for asyncronous calls (can't be used after page load). It would need to be '*element object*.innerHTML='. Has anyone found a way around this? I attempted to pass the elementId in hopes this would address it. It did not stop it from using 'document.write'. I find it surprising I'd be the first to encounter this.

Thanks,

Rico

Enrico

Replies (3)

photo
1

Hi Enrico,

I'll leave this open for the wider Community to answer, but if it's still open when I have a meeting with the developers in a couple of weeks, I'll bring it up with them then.

Kind regards,

Chris

photo
1

Hi Chris,

I have solved the issue and wanted to share in case anyone else stumbles onto it in the future.


I add in the yfReportContainer div (i.e. <div id="yfReportContainer3f21e422-751d-43c6-a81a-25n233a60h68"></div>) manually right after the script and it works. Seems the "document.write" call is only for the initial div and everything else is added in a way AJAX likes.

Thanks for your help!

photo
1

Hi Enrico,

Thanks for letting us know and adding to our wider collection of knowledge!

Hope you have a great week.

Kind regards,

Chris

Leave a Comment
 
Attach a file