Free Support Forum -

Using results from web service



I am making ajax calls to the groupdocs viewer web service to return the javascript libraries and the inlineDocument script.

However once I get the javascript libraries and append them to the html head element, where all the other scripts are, I get an error when the following three scripts are evaluated. The first script says it cant get cssTransforms of undefined and the others say they cant get prototype of undefined

this is the ajax call I am making

url: “http://localhost:2222/WebServiceProvidingViewer.asmx/GetJavaScriptLibraries”,
type: ‘POST’,
async: false,
contentType: “application/x-www-form-urlencoded”
var scripts = $.parseHTML(data.documentElement.textContent, document, true);

Any help would be appreciated.


Hi John,

We are sorry to hear that you have such issue. Unfortunately I was not able to reproduce the issue. Here is the code that I use:

and the webmethod code:
public string GetJavaScriptLibraries()
return Viewer.CreateScriptLoadBlock().LoadJquery().LoadJqueryUi().UseHttpHandlers().ToString();

public string GetInlineDocumentScript()
string groupdocsViewerScript;
groupdocsViewerScript = Viewer.ClientCode()
return groupdocsViewerScript;

Please try to use it and notify me with the results. If this will not help you - please share with me example of you project that I can run and test it on my side.

Thank you.