Pergunta

I have a forms library with a few Infopath forms in them. I want to make it so that clicking on the form will open it in a new window/tab. I have added a CEWP with Javascript to give the hyperlinks the target blank attribute, but they still continue to open in the same window.

<script type="text/javascript">
$(document).ready(function(){
    $('#onetidDoclibViewTbl0 a').attr('target', '_blank');}
);
</script>
Foi útil?

Solução

Never mind I figured it out. There was an onclick function for the hyperlinks that was causing it to open in the same window. I followed the instructions from this post and fixed it.

Opening a document in a SharePoint 2013 document library in a new tab (using code)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top