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

How to Open Rad Window from a Content Page(From Master)?

1 Answer 120 Views
Window
This is a migrated thread and some comments may be shown as answers.
Pradeep
Top achievements
Rank 1
Pradeep asked on 15 Sep 2010, 01:06 PM
I am using a radwindow. In single aspx page its working correctly. But now am using a master page and its content page; Rad window palced in content page inside a ContentPlace Holder. But now its throws a following javascript error.

1)    "Microsoft JScript runtime error: Object expected"

How to solve this? My codes given below.


<script type="text/javascript">
  
    function openRadWindow(Url, WindowName) {
        var oWnd = radopen(Url, WindowName);
        oWnd.center();
    }
  
</script>

protected void RadToolBar1_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
    {
  
        switch (e.Item.Value)
        {
            case "FileAttachment": FileAttachment();
                break;
            case "PredefinedWorkFlow": PredefinedWorkFlow();
                break;
            case "ManualWorkFlow": ManualWorkFlow();
                break;
        }
  
    }
 protected void PredefinedWorkFlow()
    {
        RadWindowPredefinedWorkFlow.VisibleOnPageLoad = true;
  
        string nm = RadWindowPredefinedWorkFlow.ClientID;
  
        string Script1 = "<SCRIPT LANGUAGE='JavaScript'> ";
        Script1 += "openRadWindow('PredefinedWorkFlow.aspx','RadWindowPredefinedWorkFlow')";
        Script1 += "</SCRIPT>";
  
        ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "open", Script1, false);
    }

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 17 Sep 2010, 03:22 PM
Hello Pradeep,

RadControls for ASP.NET AJAX are built on MS AJAX framework and they all, including RadWidnowManager (radopen is a part of the RadWidnowManager), require that framework to be loaded on the page in order to use their client-side objects. This means that, you need to call the radopen method after the MS AJAX's load event. More details about how to achieve this can be found in this KB article (radalert is a part of the RadWindowManager as well).

I hope this helps.

Kind regards,
Fiko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
Pradeep
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or