I have an interesting puzzle. This works perfectly in a standard HTML page, but I can't seem to get it working in ExtJS.
Here is what I do in the HTML:
1) Draw a chart (with Fusion) in a DIV tag.
2) Reference the DIV tag in javascript to call setDataURL. This updates the chart data without a full page reload
So, In Extjs:
1) Draw the chart in the HTML div
2) Load the DIV into a Panel using contentEl
3) call setDataURL on the chart DIV from a handler function.
4) **** ERROR! I get an error that chart DIV doesn't exist. This is weird, because Firebug show it in the DOM inspector
Can someone help me sort this one out.
The Javascript is:
var chart1 = new FusionCharts("Charts/ScrollLine2D.swf", "chartHistory", "900", "400", "0", "1");
function updateHandler1(){
var nf = Ext.get('g1feed').getValue();
var st = Ext.get('g1term').getValue();
var dt = Ext.get('g1date').getValue();
var newurl = '/v7/chartxml.php?'+ 'nf=' + nf + '&st='+ st + '&dt=' + dt;
Ext.Msg.alert('New URL is', newurl);
var chartObj = getChartFromId(chartHistory);
chartObj.setDataURL(newurl);
}