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 a strange issue, basically, I have the following custom action:

      Title="Navigate to:"
    <UrlAction Url="javascript:window.location='{SiteUrl}/_layouts/Pages/InterPage.aspx?listid={ListId}&amp;itemid={ItemId}&amp;source='+window.location" />

Based on content type this custom action appears in DisplayForm, but the problem is when i click it, it does'nt redicrect to another "InterPage.aspx", the page just refreshes and that is it ...

Any idea what the problem could be?

Note: it is for sharepoint 2007

share|improve this question
Its seem to work on 2010.strange issue in 2007. but can you try this : <UrlAction Url="javascript:void(window.location.href='{SiteUrl}/_layouts/Pages/‌​px?listid={ListId}&amp;itemid={ItemId}&amp;source='+window.location)" /> – Jigs Apr 17 '13 at 8:05

Try using window.loaction.href in UrlAction for redirecting.

share|improve this answer
i tried, but it is still the same behaviour :( no success – Shkipper Apr 17 '13 at 7:35
When you click on that button, there is no change in your page URL right? It means UrlAction is not called. Else if changed try navigating to any test page. – suren Apr 17 '13 at 7:47
Try this..<UrlAction Url="javascript:void('','_blank'))"/>; – suren Apr 17 '13 at 7:56
Oh, yes, this does work!, but yea again it opens a new window but i have to redirect on current – Shkipper Apr 17 '13 at 9:54
Then use _self instead of _blank. – suren Apr 17 '13 at 10:10
up vote 0 down vote accepted

I solved the issue having the following url:

 <UrlAction Url="javascript:function GoToUrl(){var site='{SiteUrl}';var item='{ItemId}';var list='{ListId}';window.location.href=site+'/_layouts/Pages/InterPage.aspx?list='+list+'&amp;ID='+item};GoToUrl();return false;"/>
share|improve this answer

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.