Free Support Forum -

Calling javascript events in a button click



I am trying to call existing method using my own custom button. Instead of using your toolbar, i wanted to create my own toolbar and when they click on the button, i will call your method. How should i go about it? Is it done using javascript or by using server side code? Is there a sample code available?



Hello Rajagopalan,

Thank you for your request. Yes. you can create your own dashboard. For how to do that and code example please download our examples and check “GroupDocsViewerMVCDemo” sample.

Best regards.


Hi Pavel,

I did create my own custom button (Zoom) just like the ones in “GroupDocsViewerMVCDemo” sample. It’s not working. When i click on the Zoom button, javascript event is not happening. Please find the javascript code mentioned below

I suspect that the issue could be in the method that i call (containerElement.groupdocsAnnotation). Is there a method equivalent to the one in Viewer (containerElement.groupdocsViewer)for Annotation?

Thanks and Regards,


Hello Raja,

Sorry for the misunderstanding (I thought that you use Viewer). Unfortunately in the Annotation this feature doesn’t available. At this time we work on the brand new Annotation and in it you will have such possibility.

Sorry for the inconvenience.