This is a migrated thread and some comments may be shown as answers.

Add OnClick handler to anchor tag in document manager

1 Answer 204 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 11 Feb 2015, 03:39 PM
How do I add a onclick handler to my DocumentManager control? I can alter the href or URL property from a ExtendedFileProvider to add "javascript:clickHandler()". But this isn't good practice.

I have both a LinkManager and a DocumentManager. How do I add an onClick to the <a> tags that get generated by these controls?

Thank you!

1 Answer, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 16 Feb 2015, 06:13 AM
Hi Andrew,

You can use the client-side OnClientDomChange event to intercept when a link is added from eh Hyperlink manager or the Document manager. The attached handler can further modify the anchor element inserted and add the desired onclick handler.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Andrew
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Share this question
or