Hi all,
I have read through several threads about handling the close button ("X") on the RadWindow and am a little confused on what I need to do. I am using version Q2 2008 SP2 and referenced the dlls in the 35bin
What I am trying to accomplish is the following:
There is a page with a list of items from a table. A user clicks on a button to open up a RadWindow. This window allows a user to add 1 or more items to a table which the rad window establishes a connection to add the data. After each add, the identity column is stored/appended in a hidden field. When the window is closed, the items in the hidden field are passed back to the main page using the argument property of the window before closing the window and the OnClientClose property of the RadWindowManager which in turn references a script which takes the argument to the RadAjaxManager on the page in order to to display the newly added items.
I created close button that calls a script to return the identity(s) from the newly added items. One of the suggestions made to me was to add the close button ("X") of the window. After I added the behavior and when the close button ("X") of the window is clicked, the script that is coded in the window is not executed.
Below are 2 of the links that referenced:
Tried to implement the following code but I get a null reference when attempting get the close button in the DOM which is highlighted below:
function OpenWindow()
{
radopen("http://www.google.com","RadWindow2");
//Make sure to pass the correct window name as
//an argument when calling the ConfirmClose() function
ConfirmClose("RadWindow2");
}
function ConfirmClose(WinName)
{
var oManager = GetRadWindowManager();
var oWnd = oManager.GetWindowByName(WinName);
//Find the Close button on the page and attach to the
//onclick event
var CloseButton = document.getElementById("CloseButton" + oWnd.Id);
CloseButton.onclick = function()
{
CurrentWinName = oWnd.Id;
//radconfirm is non-blocking, so you will need to provide a callback function
radconfirm("Are you sure you want to close the window?", confirmCallBackFn);
}
}
This link handles the event of the close button on the main page but I don't see how I can get the identity(s) in that method.
Does anyone know what I would need to do?
Thanks,
Ron
I have read through several threads about handling the close button ("X") on the RadWindow and am a little confused on what I need to do. I am using version Q2 2008 SP2 and referenced the dlls in the 35bin
What I am trying to accomplish is the following:
There is a page with a list of items from a table. A user clicks on a button to open up a RadWindow. This window allows a user to add 1 or more items to a table which the rad window establishes a connection to add the data. After each add, the identity column is stored/appended in a hidden field. When the window is closed, the items in the hidden field are passed back to the main page using the argument property of the window before closing the window and the OnClientClose property of the RadWindowManager which in turn references a script which takes the argument to the RadAjaxManager on the page in order to to display the newly added items.
I created close button that calls a script to return the identity(s) from the newly added items. One of the suggestions made to me was to add the close button ("X") of the window. After I added the behavior and when the close button ("X") of the window is clicked, the script that is coded in the window is not executed.
Below are 2 of the links that referenced:
Tried to implement the following code but I get a null reference when attempting get the close button in the DOM which is highlighted below:
function OpenWindow()
{
radopen("http://www.google.com","RadWindow2");
//Make sure to pass the correct window name as
//an argument when calling the ConfirmClose() function
ConfirmClose("RadWindow2");
}
function ConfirmClose(WinName)
{
var oManager = GetRadWindowManager();
var oWnd = oManager.GetWindowByName(WinName);
//Find the Close button on the page and attach to the
//onclick event
var CloseButton = document.getElementById("CloseButton" + oWnd.Id);
CloseButton.onclick = function()
{
CurrentWinName = oWnd.Id;
//radconfirm is non-blocking, so you will need to provide a callback function
radconfirm("Are you sure you want to close the window?", confirmCallBackFn);
}
}
This link handles the event of the close button on the main page but I don't see how I can get the identity(s) in that method.
Does anyone know what I would need to do?
Thanks,
Ron