Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

3 Answers 3

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 shaneosullivan.wordpress.com/2007/12/31/… –  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: http://blogs.msdn.com/b/jfrost/archive/2009/11/08/how-to-display-a-sharepoint-dialog-from-ribbon-button-and-get-selected-item-context.aspx

Wouter

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

Your Answer

 
discard

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.