cancel
Showing results for 
Search instead for 
Did you mean: 

UpdateEvent does'nt call function

0 Kudos

Hi guys, I'm trying to launch a function using UpdateEvent from an iChart applet, I wrote the parameter  <PARAM NAME="UpdateEvent" VALUE="testing"> and the function'testing':

          function testing(){

          var myTest = document.cnc_testing_switch.getChartObject();

          on_off = myTest.getYDataValueAt(1,1);

          if(on_off==1){

          myTest.updateChart(false);

          myTest.BackgroundColor =##00FF00;

          }

          else{

          myTest.updateChart(false);

          myTest.BackgroundColor =#FF0000;

          }

          myTest.setUpdateEventEnabled(false);

          myTest.updateChart(true);

          myTest.setUpdateEventEnabled(true);

I put this line to see if the function was called.

        alert(on_off);

}

when I run the applet I have no action at all from the function not even an error message, can you help me please ?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi

1. You can used IE debugtool to debug your code. F12 in IE (or Extra --> Dev tool). There you can set breakpoint.

2. According to Documentation. Are you sure the trigger timing is correct?

UpdateEvent

String

None

Provides the name of a JavaScript function in a Web page after the applet's contents are updated through a query to the underlying data source.

You can use this event when new data is received or the time period changes. For example, you can update multiple charts when the main chart's time period changes.

Do not create loops between applets that constantly update each other.

The setUpdateEventEnabled method can be used to dynamically enable or disable this event.