SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have added a menu item to the Personal Actions menu by creating a CustomAction like so:

    Title="My Link"
    Description="This is my custom link."
    <UrlAction Url="" />

I want that URL to open in a new window. I have tried this in the UrlAction,

<UrlAction Url="'', '_blank');" />

but it causes the first window's content to be replaced with the text "[object]". Is there a better way to do this?

EDIT: When I run it with Firebug open, the behavior is slightly different. The first window's URL changed to "'', '_blank');" and its content changed to "[object Window]".

share|improve this question
@FalakMahmood: Yes, in 2010. – Jeremy Jan 9 '13 at 0:54
up vote 4 down vote accepted

It should work:

<UrlAction Url="javascript:void('','_blank'))"/>
share|improve this answer
Yes! That works. Thanks for the update. – Jeremy Jan 9 '13 at 1:35
Let's delete the comments :) – Falak Mahmood Jan 9 '13 at 1:36

Here is an excerpt from the msdn page that seems to achieve what you are looking to do

 <CommandUIHandler Command="{4E2F5DC0-FE2C-4466-BB2D-3ED0D1917763}" CommandAction="''.concat(escape(document.title)))" />

And this is the link to where I found it

Hope its what you need

share|improve this answer
I'm not quite sure where to put the CommandUIHandler element. I'm not adding a ribbon button, which might be the problem. – Jeremy Jan 9 '13 at 1:09
It would go inplace of the <UrlAction> although UrlAction should be working – user13186 Jan 9 '13 at 1:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.