Free Support Forum -

Not able to hit web method from JS method $('#divId').groupdocsViewer({})


In order to upgrade the groupdocs to its new version I am trying to load docx file on web page.
I went through with your demo asp_net project. I am facing one issue:
I am not able to hit webmethod
public static ViewDocumentResponse ViewDocument(ViewDocumentParameters request)

from given JS

I have added all required JS libraries, amd config change related to web service but not sure why it is not working

Please provide me a solution or give me steps what are required to hit Webmethod from groupdocs JS.



Hi there,

Thanks for posting your issue.

In sample project, the JavaScript parameters i-e filePath, showPrint etc. are processed in GroupdocsViewer.all.js and installableViewer.js files. After that, the web methods are called using the AJAX calls in mentioned JavaScript files. Web methods render the requested document into html pages or images and sends the response back.

In your case, please check if you are getting any error in browser’s console. Also, you can check the request and response of the AJAX calls using some tool i-e Firebug in your browser. This will surely help you to locate the issue.

We shall be waiting for your response.

Warm Regards