Sign in to follow this  
simsonic

Change between diffrent XML Files with Button

Recommended Posts

Hi. Is there any option to change the XML files with the normally buttons like in the previews?

Like in the FusionCharts_IS2_Ent Documentation under FusionCharts_IS2_Ent/HelpDocs/Index.html

In this case the Buttons change the whole XML Data. But i just want to change the XML File Variable.

I tried it but i failed.

 <HTML>
<HEAD>
<TITLE>FusionCharts Client Side Dynamic Chart</TITLE>
<LINK REL=stylesheet HREF="Style.css" />
<SCRIPT LANGUAGE="JavaScript">
<!--
function setFCNewData(objFlash, strXML)
{
   //This function updates the entire XML data for a chart.
   //Get a reference to the movie
   var FCObject="FI2_Angular";
   //Set the data
   //Set dataURL to null
   FCObject.SetVariable("_root.dataURL","");
   //Set the flag
   FCObject.SetVariable("_root.isNewData","1");
   //Set the actual data
   FCObject.SetVariable("_root.newData",strXML);
   //Go to the required frame
   FCObject.TGotoLabel('/','JavaScriptHandler');
}
function getObject(objectName) {
   if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[objectName]
   } else {
    return document.embeds[objectName];
   }
}
//Store the XML data in local variables
//Download to Sales Ratio
var strXML1 = "MTD.xml";
//Cost per click
var strXML2 = "YTD.xml";
//-->
</SCRIPT>
</HEAD>
<BODY bgcolor="#FFFFFF">
... HTML Code ...
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
 WIDTH="180" HEIGHT="140" ALIGN="">
 <PARAM NAME=movie VALUE="FI2_Angular.swf">
 <PARAM NAME=quality VALUE=high>
 <PARAM NAME=FlashVars Value="&dataURL=data.xml&chartWidth=180&chartHeight=140">
 <EMBED src="FI2_Angular.swf" FlashVars="&dataURL=data.xml&chartWidth=180&chartHeight=140" quality=high bgcolor=#FFFFFF  WIDTH="180" HEIGHT="140" ALIGN=""
 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
... HTML Code ...
<input type="submit" class="button" value="Download To Sales Conversion" onclick="setFCNewData('FI2_Angular', strXML1);">
<br>
<input type="submit" class="button" value="Cost Per Download" onclick="setFCNewData('FI2_Angular', strXML2);">
... HTML Code ...
</body>
</html> 

THX for Help. Greetings from Switzerland

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this