When we click on the document link (Title of document) from library view,Document will open in browser(IF office web app is configured) or its get download.
But I want to open document on modal dialog.
How we can achieve this?Any idea?
When we click on the document link (Title of document) from library view,Document will open in browser(IF office web app is configured) or its get download.
But I want to open document on modal dialog.
How we can achieve this?Any idea?
Try this script
$('a.classname').click(function(){
var dlgOptions = { url:'/Lists/List Name/Name of File.pdf', autoSize: true, autoSizeStartWidth: 550 };
SP.UI.ModalDialog.showModalDialog(dlgOptions);
return false;
})
Though I haven't done this, and I cannot say if it will work, but I think you can do the below to get it work:
HTH..