ryanlcs Posted July 23, 2009 Report Share Posted July 23, 2009 Hi I have this code, which I wanted to enable the scroll bar on checked of a check box. But when I checked the check box, I get prompted for this error: refer to attached. Saying the target 'Charts' for callback could not be found. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Charts.Gallery = Gallery.Bar Charts.UseCallbacksForEvents = TrueCharts.Data.Clear() Charts.BackColor = System.Drawing.Color.LightGray Charts.Background = NothingCharts.PlotAreaColor = System.Drawing.ColorTranslator.FromHtml("#FFFFCC") Charts.LegendBox.Dock = DockArea.Top Charts.RenderFormat = ".Net"AddHandler Charts.UserCallback, AddressOf ChartFX_UserCallback chkEnableScrollbar.Attributes.Add( "OnClick", "Feed1(" & Application("waitingSeconds") & ")")End Sub Protected Sub ChartFX_UserCallback(ByVal sender As Object, ByVal e As ChartFX.WebForms.UserCallbackEventArgs) If e.Param = "1" Thensender.AxisX.AutoScroll = Truesender.AxisX.PixelsPerUnit = 17 sender.AxisX.ScrollPosition = sender.AxisX.ScrollSize Elsesender.AxisX.AutoScroll = False End If End Sub Javascript code: function Feed1(waitingseconds) {document.getElementById("chkEnableScrollbar").disabled = true;if (document.getElementById("chkEnableScrollbar").checked == false) { scrollchecked = 0; milisecond = 10; } else{ scrollchecked = 1; milisecond = waitingseconds; } setTimeout('Callback_Relay(' + scrollchecked + ')', milisecond); } function Callback_Relay(intScrollchecked) { SFX_SendUserCallback("Charts",intScrollchecked,false); document.getElementById( "chkEnableScrollbar").disabled = false;} Quote Link to comment Share on other sites More sharing options...
juanZ Posted July 24, 2009 Report Share Posted July 24, 2009 hmmm. Im going to try run your code. meanwhile, you can check the last post of this thread. I posted a sample application in C# that shows how to to this and it working well. So, you can by the moment you can check it out while i get your code. http://community.softwarefx.com/forums/p/10500/25656.aspx#25656 Also, can you please post the aspx page code you define to declare the chart? Juan. Quote Link to comment Share on other sites More sharing options...
ryanlcs Posted July 25, 2009 Author Report Share Posted July 25, 2009 hi.. This is how I declare the chart: Dim Charts As New ChartFX.WebForms.ChartActually, I got this problem solved. I forget to assign the "Charts.ID = Charts". But now, another problem arise. When I click on the checkbox, nothing happen. No error message prompted whatsoever. Just nothing happen. Thanks. Quote Link to comment Share on other sites More sharing options...
juanZ Posted July 27, 2009 Report Share Posted July 27, 2009 Is your Chart Render Format = .Net ? Quote Link to comment Share on other sites More sharing options...
juanZ Posted July 27, 2009 Report Share Posted July 27, 2009 Sorry, I saw on the first post you chart is rendered as .Net. Try to put your Activex component as full trust. Sometimes IE restrictis this kind of interactions for security reasons. Quote Link to comment Share on other sites More sharing options...
ryanlcs Posted July 29, 2009 Author Report Share Posted July 29, 2009 Sorry, I have no idea how to do it. Can you provide me the guide? Thanks. Quote Link to comment Share on other sites More sharing options...
juanZ Posted July 30, 2009 Report Share Posted July 30, 2009 Hi, you can open Internet explorer -> Tools -> Options -> Security [Trusted Sites] and configure ActiveX controls and plugins so they can have enough access and permissions. You can also use caspol to set permissions like this: open a visual studio command prompt or navigate (with CD command) : cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 you can also set Full trust to all in the internet zone. caspol -machine -chggroup Internet_Zone FullTrust Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.