Kjell Posted November 16, 2007 Report Share Posted November 16, 2007 Oki I have done everything I can think of to get that usercommand event running on the clientside. And I cannot for the life of me get it going (.NET RenderFormat). The usercommand event triggers without problem on the server side. I have granted the assemblies full trust. I am running in a full trust intranet zone. I have tried attaching a handler as suggested: < script type="text/javascript" for="MyChart" event="UserCommand(sender,eventargs)">alert('Test'); </script>And I tried attaching using javascript via attachEvent and addEventListener... And the events don't seem to be triggered. What am I doing wrong? I have added a Command like so: Dim cmd As ChartFX.WebForms.Command cmd = New ChartFX.WebForms.Command(20)cmd.Text = "Test"MyChart.Commands.Add(cmd) MyChart.ToolBar.Insert(0, New ChartFX.WebForms.ToolBarItem(20)) Anyone who can help? Link to comment Share on other sites More sharing options...
maximop Posted November 16, 2007 Report Share Posted November 16, 2007 I am unable to replicate this problem. The UserCommand gets fired as expected. Please make sure that the .NET Framework Trust is set to "Full Trust" for My Computer, Intranet, and Trusted Sites. Also, make sure that your Internet Browser is allowed to execute JavaScript code. Below is the code I used: Server-side code: Chart1.ToolBar.Visible = TrueChart1.RenderFormat = ".NET"Dim cmd As Command cmd = New Command(1) cmd.Text = "Test Command"Chart1.Commands.Add(cmd) Chart1.ToolBar.Insert(0, New ToolBarItem(1))Client-side code: < script language="javascript" for="Chart1" event="UserCommand(obj,args)">alert("Test Command Fired!"); </script> Link to comment Share on other sites More sharing options...
Kjell Posted November 20, 2007 Author Report Share Posted November 20, 2007 Tried again today and now it works.... I'm guessing the server needed a reboot or something Thanks for the help /K Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.