I have a simple program where I assign attributes to a raddock in Page_Load and then pull these attributes using Javascript when the dock is moved (dock.get_element().MyAttribute). In IE, this works great, but in FireFox and Safari the "get_element().MyAttribute" always returns "undefined". I'm assuming it is simple syntax, but need some guidance.
ASPX:
CODE:
VS 2008, Telerik 2010.2.713.35
ASPX:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script type="text/javascript"> var zones; function OnClientInitialize(dock, args) { zones = Telerik.Web.UI.RadDockZonesGlobalArray; } function OnDockChangedPosition(dock, args) { var zone; zone = dock.get_dockZone(); var sDockJustMoved; sDockJustMoved = ""; sDockJustMoved = dock.get_element().TestDock + "~" + zone.get_element().TestZone; alert(sDockJustMoved); } </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager> <div> <telerik:RadDockLayout ID="RadDockLayout1" runat="server"> <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"> <telerik:RadDock ID="RadDock1" runat="server" Width="300px" OnClientDockPositionChanged="OnDockChangedPosition"> </telerik:RadDock> </telerik:RadDockZone> <telerik:RadDockZone ID="RadDockZone2" runat="server" Height="300px" Width="300px"> </telerik:RadDockZone> </telerik:RadDockLayout> </div> </form> </body> </html>CODE:
Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load RadDock1.Attributes.Add("TestDock", "Dock Attribute") RadDockZone1.Attributes.Add("TestZone", "Zone1 Attribute") RadDockZone2.Attributes.Add("TestZone", "Zone2 Attribute") End SubEnd ClassVS 2008, Telerik 2010.2.713.35