Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Passing Args Client-Side to Client-Side with Radopen

$
0
0

I'm modernizing some really old code that used the old Rad toolkit.  I found that the "argument" property is not persisting.  I was able to change the window's close code around to pass the element in the close() function, but can't find a way to do this when opening the form.  I'm using VS2013 with ASP.NET AJAX and Telerik.Web.UI v2015.3.930.45.

Please take a look and advise.  I don't want to make a round-trip to the server for this.  I also found that javascript globals do not persist between postbacks.  So I can't use that sloppy method either.  FYI - I keep the window open and the user may initiate a number of postbacks with an runat=server asp:button before I close it from the client side.

 

Javascript being called from a client-side radmenu click on the main page.  "notesExist" is a string value.

function ShowNotesForm(id, notesExist) {

    var oWnd = window.radopen("Dialogs/Notes.aspx?DocID=" + id, "NotesDialog");
    oWnd.argument = notesExist;

}

 

Javascript within my Notes.aspx:

 

        <telerik:RadScriptBlock runat="server">
            <script type="text/javascript">
                $(document).ready(function () {
                    alert(GetRadWindow().Argument);
                });
            </script>
        </telerik:RadScriptBlock>

 

I've tried reading GetRadWindow().Argument in other sections like after a button-click on the client-side, but put it here to make it easy to replicate on your end.

 


Viewing all articles
Browse latest Browse all 84751

Trending Articles