Wednesday, June 11, 2008

SharePoint 2007: Custom Action That Opens A Popup Window

Sheetal Jain points out something that no one else seems to mention when trying to create a custom action that pops up a new window in SharePoint 2007.

The standard method that all the samples show looks something like this:

<UrlAction url="javascript:window.open('/_layouts/someForm.aspx')" >

However, this does not work. The new form does indeed popup, but the original window will then display just "[Object]". The solution is to add the keyword "void" in front of the window.open call:

<UrlAction url="javascript:void window.open('/_layouts/someForm.aspx');" >


0 comments: