Rich-text Reply

Load content from an external JSON file.

andreamoro 11-19-14

Load content from an external JSON file.

Hello,

 

I've been trying to load content from an external JSON file. However when I paste a script - which runs perfectly on JSFeedle - the editor returns an error on the line where the getJSON method is used.

 

$.getScript("http://.../test.json", function () { ....

 

I can't think to any timing or scope issues here, as the problem is straight with the editor.

 

Can somebody advice please?

Thanks

Andrea

Joel_Balmer 11-20-14
 

Re: Load content from an external JSON file.

Hi there,

Are you including the trimmed version of jQuery, full version, or scoping to the jQuery on your page?
andreamoro 12-02-14
 

Re: Load content from an external JSON file.

Was the default jQuery installed along with Optimizely. In the end was able to get the script running. However, in edit mode I wasn't able to make a test and verify the inclusion (annoying). 

 

The only way to test the test (sorry for repeating myself) was going inpreview mode.

 

Any indication for avoiding this long process?