Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 10th, 2012  |  syntax: None  |  size: 0.92 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. how to refresh parent page when I use SP.UI.ModalDialog.OpenPopUpPage?
  2. function OpenCustomDialog(dialogUrl, dialogWidth, dialogHeight, dialogTitle, dialogAllowMaximize, dialogShowClose) {
  3.  
  4.     var options = {
  5.         url: dialogUrl,
  6.         allowMaximize: dialogAllowMaximize,
  7.         showClose: dialogShowClose,
  8.         width: dialogWidth,
  9.         height: dialogHeight,
  10.         title: dialogTitle,
  11.         dialogReturnValueCallback: Function.createDelegate(null, CloseCallback3)
  12.     };
  13.     SP.UI.ModalDialog.showModalDialog(options);
  14. }
  15.        
  16. SP.UI.ModalDialog.OpenPopUpPage(dialogUrl, null, dialogWidth, dialogHeight);
  17.        
  18. function CustomPageRefresh(dialogResult, returnValue) {
  19.     document.location.reload(); //or another method you need to refresh the page in your case
  20. }
  21.        
  22. function OpenPopupInDialog(dialogUrl, dialogWidth, dialogHeight) {
  23.     SP.UI.ModalDialog.OpenPopUpPage(dialogUrl, CustomPageRefresh, dialogWidth, dialogHeight);
  24. }