Tomo Report post Posted April 24, 2012 I use Mootools and FusionCharts the same time. When I include FusionCharts.js after including Mootools.js, the JSON object in Mootools seems be overwriten by JSON defined in FusionCharts. Otherwise, when I include FusionCharts.js before including Mootools.js, the JSON object is properly handled (mootools append attributes to the JSON object, not overwrite the JSON object). I test this and find that only IE7 has this behavior. code in FusionCharts: var JSON;JSON||(JSON={}); code in Mootools: if (!this.JSON) this.JSON = {}; Share this post Link to post Share on other sites
Guest Sumedh Report post Posted April 24, 2012 I use Mootools and FusionCharts the same time. When I include FusionCharts.js after including Mootools.js, the JSON object in Mootools seems be overwriten by JSON defined in FusionCharts. Otherwise, when I include FusionCharts.js before including Mootools.js, the JSON object is properly handled (mootools append attributes to the JSON object, not overwrite the JSON object). I test this and find that only IE7 has this behavior. code in FusionCharts: var JSON;JSON||(JSON={}); code in Mootools: if (!this.JSON) this.JSON = {}; Hi, Can you paste your sample code here? it would be helpful for us to look into the issue. Share this post Link to post Share on other sites
Tomo Report post Posted April 24, 2012 Hi, Can you paste your sample code here? it would be helpful for us to look into the issue. the sample is simple: <html> <head> <script type="text/javascript" src="./static/lib/jQuery/jquery-1.4.4.js"></script> <script type="text/javascript" src="./static/lib/MooTools/mootools-big.js"></script> <script type="text/javascript" src="./static/lib/MooTools/mootools-compat-big.js"></script> <script type="text/javascript" src="./static/lib/FusionCharts/JSClass/FusionCharts.js"></script> <script type="text/javascript"> $(document).ready(function(){ people = {"name": "tomo"}; console.log(people); alert(JSON.encode(people)); }); </script> </head> <body> </body> </html> the console raise this error: SCRIPT438: Object doesn't support property or method 'encode' Do you need the mootools or the fusioncharts js? Share this post Link to post Share on other sites
Guest Sumedh Report post Posted April 25, 2012 the sample is simple: <html> <head> <script type="text/javascript" src="./static/lib/jQuery/jquery-1.4.4.js"></script> <script type="text/javascript" src="./static/lib/MooTools/mootools-big.js"></script> <script type="text/javascript" src="./static/lib/MooTools/mootools-compat-big.js"></script> <script type="text/javascript" src="./static/lib/FusionCharts/JSClass/FusionCharts.js"></script> <script type="text/javascript"> $(document).ready(function(){ people = {"name": "tomo"}; console.log(people); alert(JSON.encode(people)); }); </script> </head> <body> </body> </html> the console raise this error: SCRIPT438: Object doesn't support property or method 'encode' Do you need the mootools or the fusioncharts js? Hi, This is a known issue of Mootools with IE7. So please contact support team of Mootools for this issue. Share this post Link to post Share on other sites
Tomo Report post Posted April 25, 2012 Hi, This is a known issue of Mootools with IE7. So please contact support team of Mootools for this issue. Thanks! Share this post Link to post Share on other sites
Guest Sumedh Report post Posted April 25, 2012 Thanks! Share this post Link to post Share on other sites
shamasis Report post Posted April 27, 2012 Hi, Can you paste your sample code here? it would be helpful for us to look into the issue. Also, to appeal to a logic, the code in FusionCharts.js var JSON; JSON || (JSON={}); and mooTools definition is exactly the same... just written in a cooler syntax by us. Share this post Link to post Share on other sites