To make links from SharePoint lists, document libraries, etc. open in new window is usually easy with FrontPage 2003 or SharePoint Designer and inserting a Data View.
But this caused problems. In some cases when you're including xslt data view you can have trouble saving site like template. What worked for me is to put a little script just before the </body> tag, that changed the target window of links inside of document library. The script is based on WSS CSS recognition so you can use it also for other cases.
Below is the code for the script:
<script language="javascript" type="text/javascript">
i=0
while (document.links[i]) //check all document links
{
if (document.links[i].parentNode.className == "ms-vb2" || document.links[i].parentNode.className == "ms-vb" || document.links[i].parentNode.className == "ms-vb-icon") //if is inside of DL webpart, do it:
{
document.links[i].target='_blank'
}
i++
}
</script>
2 comments:
Any ideas on how to get a link to open a new window in a datasheet view? I've tried everything, but to no avail! help
This is for SharePoint Portal Server 2003...
Post a Comment