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

sharepoint provides a method called "commonShowModalDialog" which is used to show a popup window. i am on the popup window now, i need to redirect to another page within the popup window. is there any way to do that.

share|improve this question

I think you need to use Javascript to close the current dialog and open a new dialog with the new URL - maybe using "window.parent"

Or maybe SPUtility.Redirect() can help?

share|improve this answer

You could simply use the javascript

window.location.href = "URL"

inside the modal dialog; this will use the context of the open modal dialog to navigate to the new page.

share|improve this answer
then it is opening in new window. i need to redirect in the same window – michael Apr 20 '11 at 11:10
Right, that's because it's using a get request. Please see… – Tim Ebenezer Apr 20 '11 at 11:16
window.location.href would use the existing browser window, not a new one. Is that not what you want? When you say same window, so you mean same browser window or same dialog "window"? – Jaap Vossers Apr 20 '11 at 12:50
Jaap (hi mate!) - it's a function of the dodgy modal window model that IE6 :( uses. See the above article. Window.location.href would normally work but not in this instance. – Tim Ebenezer Apr 20 '11 at 14:38

Likely you want to steer away from this legacy approach to showing dialogs. If you are on SharePoint 2010 a better choice is to use the dialog API.

A good walkthrough can be found on MSDN Blogs at:


share|improve this answer
Darn it, I now see the tag 'SharePoint 2007'. Sigh! – Wouter - SharePoint MVP Apr 20 '11 at 12:20

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.