Javascript Client API - How do I attach OnClientFinished event to my XAP embedded into ASP.NET page using <object>

2 posts, 0 answers
  1. hkdave95
    hkdave95 avatar
    245 posts
    Member since:
    Nov 2006

    Posted 06 Aug 2009 Link to this post

    Hi

    I am trying to display a RadProgressBar on my spalsh page.

    How do I signal my page to say when the RadProgressBar has completed?

    I would lik eto attach a OnClient event to my <object> using InitParams. To fire when the RadProgressBar has completed.

    My Page as it stands is ...

    1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Heron.Default" %> 
    2  
    3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    4  
    5 <html xmlns="http://www.w3.org/1999/xhtml" > 
    6 <head runat="server">  
    7     <title> 
    8     </title> 
    9     <telerik:RadStyleSheetManager id="rssmDefault" runat="server" /> 
    10     <link href="css/base.css" rel="stylesheet" type="text/css" /> 
    11 </head> 
    12 <body> 
    13     <form id="formHeron" runat="server">  
    14         <div align="center" style="vertical-align: middle; width: 100%; height: 100%;">  
    15             <telerik:RadScriptManager ID="rscmDefault" runat="server">  
    16                 <Scripts> 
    17                     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
    18                     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
    19                 </Scripts> 
    20             </telerik:RadScriptManager> 
    21             <telerik:RadAjaxManager ID="rajmDefault" runat="server">  
    22             </telerik:RadAjaxManager> 
    23             <telerik:RadSkinManager ID="rskmDefault" Runat="server" Skin="Default">  
    24             </telerik:RadSkinManager> 
    25             <asp:Image ID="iLogo" runat="server" ImageUrl="images/logo.png" /> 
    26             <br /> 
    27             <br /> 
    28             <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">  
    29                 <param name="source" value='<%= ResolveUrl("~/ClientBin/ProgressBarControl.xap") %>' /> 
    30                 <param name="background" value="#333333" /> 
    31                 <param name="minRuntimeVersion" value="3.0.40624.0" /> 
    32                 <param name="autoUpgrade" value="true" /> 
    33                 <param name="windowless" value="true" /> 
    34                 <param name="InitParams" value='<%= ProgressBarInitParameters %>' /> 
    35                 <href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">  
    36                     <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>  
    37                 </a> 
    38             </object> 
    39         </div> 
    40         <telerik:RadCodeBlock ID="rcobDefault" runat="server">  
    41             <script type="text/javascript" language="javascript">  
    42                 function onRadProgressFinished()  
    43                 {  
    44                     window.location = 'pages/home.aspx';  
    45                 }  
    46             </script> 
    47         </telerik:RadCodeBlock> 
    48     </form> 
    49 </body> 
    50 </html> 

    Kind Regards

    David

  2. Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 12 Aug 2009 Link to this post

    Hi hkdave95,

    We deeply apologize for the delay reply.
    Please find attached a sample project that shows how to implement interaction between JavaScript and Silverlight.
    You can also take a look at the following articles:

    http://silverlight.net/quickstarts/htmlbridge1.aspx

    I hope that this will help you.
    Please let us know if you have any other questions or you need more help.

    Greetings,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
Back to Top