Free Support Forum - groupdocs.com

Calling javascript events in a button click


#1

Hi,


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?

Thanks,
Rajagopalan.

#2

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.

#3

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,
Rajagopalan.

#4

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.