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

ajaxRequest and radopen

1 Answer 29 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
David Simmonds
Top achievements
Rank 1
David Simmonds asked on 23 Aug 2010, 08:15 PM
I have a client-side handler for OnClientClick for a button. Here is what it looks like:

function OpenReportWindow(nCompanyID, nDetailsID) { 
    var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); 
    ajaxManager.ajaxRequest("Save"); 
    var wnd = window.radopen("/CharitableSponsorshipsReport.aspx", null); 
    //wnd.setSize(750, 550); 
    return false
}

Currently the server side handler for the ajaxRequest has all of the code commented out to help solve the issue. What I see happen is that the radopen window shows and then immediately closes. If I comment out the ajaxManager.ajaxRequest code the window shows and stays. Why is this? Is there a way to do the ajaxRequest and then the radopen? The ajaxRequest server handler performs some tasks that the aspx page needs when it shows.

1 Answer, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 24 Aug 2010, 01:58 PM
Hello David,

Try handling the OnResponseEnd event of the RadAjaxManager to display the RadWindow. That way the ajax request completes its task before the RadWindow page is opened. Like so:

function responseEnd(sender, eventArgs)
{
   if (eventArgs.get_eventArgument() == "Save"){
       var wnd = window.radopen("/CharitableSponsorshipsReport.aspx", null);
   }
}

I hope that helps
Tags
Ajax
Asked by
David Simmonds
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Share this question
or