I have added a menu item to the Personal Actions menu by creating a CustomAction like so:
<CustomAction
Id="myCustomAction"
GroupId="PersonalActions"
Location="Microsoft.SharePoint.StandardMenu"
Sequence="1000"
Title="My Link"
Description="This is my custom link."
>
<UrlAction Url="http://www.example.com/" />
</CustomAction>
I want that URL to open in a new window. I have tried this in the UrlAction,
<UrlAction Url="javascript:window.open('http://www.example.com/', '_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 "javascript:window.open('http://www.example.com/', '_blank');" and its content changed to "[object Window]".