Gabriel Posted August 21, 2007 Report Share Posted August 21, 2007 I've been trying to get this to work for a little while now and I can't figure it out. The UserCommand event doesn't fire in the javascript. I'm sure its a minor detail I'm overlooking. Anyway, here is the basic example that I've been working with. Its just a simple new VB project with a chart control. Where am I going wrong? I should also add that I've set .NET trust settings to full trust for the appropriate zone. Default.aspx: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %><html><body > <script language="JavaScript" for="Chart1" event="UserCommand(sender, args)"> <!--alert("Custom Command");--> </script> <form id="form1" runat="server"> <div> <chartfx7:Chart ID="Chart1" runat="server"> </chartfx7:Chart> </div> </form></body></html> Default.aspx.vb: Partial Class _Default Inherits System.Web.UI.Page Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load Chart1.RenderFormat = ".NET" Chart1.ToolBar.Visible = True Chart1.ToolBar.Clear() Dim cmds As ChartFX.WebForms.CommandCollection cmds = Chart1.Commands cmds.Add(New ChartFX.WebForms.Command(20)) cmds(20).ImageIndex = 1 cmds(20).Enabled = True cmds(20).Style = ChartFX.WebForms.CommandStyles.TwoState Chart1.ToolBar.Insert(0, New ChartFX.WebForms.ToolBarItem(20)) End SubEnd Class Link to comment Share on other sites More sharing options...
Frank Posted August 21, 2007 Report Share Posted August 21, 2007 Is the .NET Client running with full trust? It needs it in order to call events in your JavaScript. Link to comment Share on other sites More sharing options...
Gabriel Posted August 21, 2007 Author Report Share Posted August 21, 2007 yes. I'm running it locally using the visual studio ASP.NET development server. I do occasionally try running it from a test server on our network. The trust settings are set to full trust for all zones in .net 1.1 and 2.0. Link to comment Share on other sites More sharing options...
Gabriel Posted August 22, 2007 Author Report Share Posted August 22, 2007 Nevermind, it is working now. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.