If you need to include a custom hyper link - You need to use
So in order to open a link in a new window you can use the good old javascript:window.open(url)
e.g.
<urlaction url="javascript:window.open('url')" >
What is wrong with the above line ???
Well, the above line works when deployed in SharePoint - The target link in fact does opened in in a new window but while IE opens the link in a new window, it also replaces the current window with [Object] message (IE tries to open the javascript as a link in the current window) - This is pretty annoying - You need to click the back button to go back to the previous screen in the current window...
How to solve the problem in IE ?
Well , you can trick IE to think this is not a window.open() command and you are executing a custom script - So just replace the above url with something like
<urlaction url="javasscript:void window.open('url')">
And now IE will only open the link in a new window -
I hope Microsoft fixes this during SP1 time frame by providing a "target" attribute on UrlAction element
3 comments:
You rock. Was doing exactly the same thing, add void infront of call, works like a charm!
Thx amn
You rock. Was doing exactly the same thing, add void infront of call, works like a charm!
Thx
I can't get the code to work... I'm reading in the Step by Step Microsoft Windows SharePoint Services 3.0 book on page 29 that I should be able to open the link up for editing and add javascript:void(window.open('url')) and that should work and I've tried your suggested code - I'm addding your code right in the the Links URL box...??
Post a Comment