1

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.

1

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?

0

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.

  • 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
0

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

  • 1
    Darn it, I now see the tag 'SharePoint 2007'. Sigh! – Wouter Apr 20 '11 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.