|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/9/2008 1:25:18 PM
Posts: 2,
Visits: 2
|
|
| Hi. I'm using JSClass and Javascript to render some charts. I want to include a simple <select> with some options and then redraw the chart based upon the chosen option. I can get it to work in IE7 but not in Firefox. Firefox will not render the new chart based upon a different selection. Has anyone else experienced this? My markup looks like this: < div id="picker"><form name="chartPicker"><select name="chartType"><option value="kbymo">Contracts by Month</option><option value="kbyrep">Contracts by Sales Rep</option><option value="kbystage">Contracts by Stage</option></select><input type="button" value="Show Chart" onclick="buildChart('chart');"/></form></div><div id="chart"></div>And my Javascript looks like this: var myChart;function buildChart(targetID){var chartType = document.chartPicker.chartType.value;myChart = new FusionCharts("../Flash/FCF_Pie3D.swf", targetID, "400", "300", "0", "1");if (chartType == "kbymo"){myChart .setDataURL("../Fragments/dbymo.xml");}else if (chartType == "kbyrep"){myChart .setDataURL("../Fragments/dbyrep.xml");}else {myChart .setDataURL("../Fragments/dbystage.xml");}myChart .render(targetID);}
|
|
|
|
|
Supreme Being
      
Group: Moderators
Last Login: Today @ 7:43:49 AM
Posts: 880,
Visits: 1,415
|
|
| Hi, Could you please try giving a different chart DOM id, other than the targetID? NOTE : Chart id and target div id should be unique, distinct. e.g. var myChart = new FusionCharts("../Flash/FCF_Pie3D.swf", targetID+"Id", "400", "300", "0", "1"); ... myChart.render(targetID);
Regards,
Sudipto Choudhury FusionCharts Team
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 7/9/2008 1:25:18 PM
Posts: 2,
Visits: 2
|
|
| Thanks! That did it. I missed that small little detail in the documentation.
|
|
|
|