open sharepoint attachment in browser new window

To open sharepoint attachment in browser new window. here is the code $(document).ready(function() { $.each($("a[onclick*='DispDocItemExWithServerRedirect']"), function(i, anchor) { var attUrl = $(this).attr("href"); $(this).removeAttr("onclick"); $(this).removeAttr("onmousedown"); $(this).click(function (){ window.open(attUrl); return false;}); }); });

Comments

AlexanderK79 said…
Where do I put this code on my form to have it activated?

Popular posts from this blog

what is Event Cache table in sharepoint

CAML Query syntax and options in SharePoint

Change anchor link url in sharepoint calender