This is a migrated thread and some comments may be shown as answers.

Retry/Cancel dialog from close of radwindow

3 Answers 132 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ratndeep
Top achievements
Rank 1
Ratndeep asked on 05 Jun 2009, 07:07 AM
I am opening radwindow from a page.
i have placed a button called cancel on radwindow.
but when i click on it i get this message ..

"To display the webpage again, Internet explorer needs to resnd the Information you've previously submitted. If you were making a purchase ......"

i have called this script to close window.

function SubmitPage()

 

{

GetRadWindow().BrowserWindow.location.reload();

GetRadWindow().BrowserWindow.SubmitPage();

}
as i want to retain the values that i have filled in parent page after closing rad window.
Please Help..

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Jun 2009, 08:03 AM
Hi Ratndeep,

IE displays this message when you reload the parent page that was generated by http post. I am not sure about the scenario that you trying and if you want to simply close the window, then you can call the close() method rather than reloading the parent page. Here is the code for page that loaded in radwindow.

ASPX:
 
<input id="Button3" type="button" value="Close window" onclick="SubmitPage();" /> 

JavaScript:
 
<script type="text/javascript">  
function SubmitPage()  
{  
    GetRadWindow().close();  // Close the window  
    //GetRadWindow().BrowserWindow.SubmitPage(); //Calls function in parent page  
}  
function GetRadWindow()  
{  
  var oWindow = null;  
  if (window.radWindow)  
     oWindow = window.radWindow;  
  else if (window.frameElement.radWindow)  
     oWindow = window.frameElement.radWindow;  
  return oWindow;  
}  
</script> 

Thanks,
Princy.
0
Ratndeep
Top achievements
Rank 1
answered on 05 Jun 2009, 08:36 AM
Thanks Princy for this solution.. and
i also want to know that how can we disable the vertical bar in radwindow.
0
Shinu
Top achievements
Rank 2
answered on 05 Jun 2009, 10:08 AM
Hello Ratndeep,

I guess you want to avoid the vertical scroll-bar in radwindow. If so, you can either set the AutoSize property of RadWindow to True for resizing the RadWindow according its content, or set the height dynamically from clientside.

Checkout the following online demo which depicts the AutoSize feature of radwindow.
Automatically Change Size

You can set the height of the RadWindow using the set_height() method of RadWindow. Checkout the KB article which shows how to resize the radwindow based on the content by using client side code.
Automatically resizing a RadWindow depending on its content

-Shinu.
Tags
Window
Asked by
Ratndeep
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ratndeep
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or