gslender / ofcgwt

Automatically exported from code.google.com/p/ofcgwt
0 stars 0 forks source link

Problems with removing of the chart in IE7 and host mode. #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Whenever I want to remove a chart from the view. (e.g. chart is on the
TabItem and I want to close it) The run-time message appear "Error: 'null'
is null or not an object." 

If i open it in debugger the following code appear:
try {
document.getElementById("swfID_0").SetReturnValue(__flash__toXML(ofc_resize(34,-
47,18,-39))
); } catch (e) {
document.getElementById("swfID_0").SetReturnValue("<undefined/>"); }

I don't know any single thing about JavaScript. 

E.g. we have a ContentPanel cp and I add GxtChartWidget chart1 on it. After
a chart was rendered I call cp.remove(chart1) method this error will pop-up.

I had a same problem when I was using gwt-ext charts. However on thier
showcase website with http://gwt-ext.com/demo-charts/#incomeChart I can
remove the tab with out any exception. So probably the problem is not with
the chart framwork but rather with my code?

Original issue reported on code.google.com by smfedo...@gmail.com on 20 Mar 2009 at 9:38

GoogleCodeExporter commented 9 years ago
Ext GWT v2.0 (GXT) will be releasing full chart support. If you are a SVN 
member you
can get code now.

Original comment by gslen...@gmail.com on 3 Apr 2009 at 6:32

GoogleCodeExporter commented 9 years ago
I've happened the same problem:
try {
document.getElementById("my_chart").SetReturnValue(__flash__toXML(ofc_resize([27
,-66,18,-77.9]))
); } catch (e) { 
document.getElementById("my_chart").SetReturnValue("<undefined/>"); }

My code:
$('#tabs-3').html('');
swfobject.embedSWF("/library/OFC/open-flash-chart.swf",
                   "my_chart",
                   "640",
                   "320",
                   "9.0.0",
                   "expressInstall.swf",

{"data-file":'http://'+window.location.host+"/dashboard/get.Bid.Changes.Chart?"+
$.param(data).split('&').join('%26')
                   },
                   {'wmode':'transparent'
                   }
                  );

the 'my_chart' div is in the 'tabs-3' div.

Finally, i fixed the problem by modifying:
$('#tabs-3').html('');
to:
$('#tabs-3')[0].innerHTML='';

So weird!!!

Original comment by kexianbi...@gtempaccount.com on 8 Jan 2010 at 12:57