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

Problem to open radwindow

2 Answers 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Coolbudy
Top achievements
Rank 1
Coolbudy asked on 13 Jun 2013, 12:45 PM
Here is my javacript  that open radwindow
  function RadWindowOpenCourseContinuen(num, cid) {
                var wnd = $find("<%=modalPopup.ClientID %>");
                wnd.setUrl("test.aspx");
                wnd.show();
                return false;
            }
Here is button that open radwindow
  <asp:Button ID="btnContinue" runat="server" CssClass="button" TabIndex="37" Text="Click here to continue..."
                                            OnClientClick="RadWindowOpenCourseContinuen(); return false; " />
Here is my code behind part
  string strhtmlnew = "javascript:RadWindowOpenCourseContinuen('1','" + Session["CID"] + "');";
 btnContinue.Attributes.Add("onclick", strhtmlnew);
Problem is not passed argument simple open test page

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 13 Jun 2013, 01:14 PM
Hi,

To open a RadWindow and pass arguments please try the following.
ASPX:
<asp:Button ID="button1" runat="server" Text="open" />

C#:
string test="teststring";
button1.Attributes.Add("onclick", "OpenWindow('1','" + test + "');return false;");

JS:
function OpenWindow(id, test)
 {
    alert(id);
    alert(test);
    var oWnd = $find("<%=RadWindow1.ClientID%>");
    oWnd.setUrl('Default.aspx');
    oWnd.show();    
 }

Note: call the function either from ASPX or from server side.

Thanks,
Shinu.
0
Coolbudy
Top achievements
Rank 1
answered on 14 Jun 2013, 06:42 AM
Thanks Shinu its work.............:-)
Tags
General Discussions
Asked by
Coolbudy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Coolbudy
Top achievements
Rank 1
Share this question
or