javascript - json causes problem in IE -


i'm using bit of javascript json string send data flash project

        var flashvars = {          xmlfile: 'http://iyt.psu.edu/xml/abington/home.xml',         preface: 'http://iyt.psu.edu/',         preload: '{"url":"flash/project.swf","x":"375","y":"237","link":"home","tween":{"prop":"y","begin":"0","finish":"-200","duration":"1"}}'     }; 

however preload line causes problems in ie have idea i"m might doing wrong besides using ie ; ^ )

if there trailing comma , using firefox or webkit based browser fine. in ie trailing commas no more object properties cause problem may not obvious.

this fail. see comma @ end:

var flashvars = {          "xmlfile" : "http://iyt.psu.edu/xml/abington/home.xml",         "preface" : "http://iyt.psu.edu/",         "preload" : "{'url': 'flash/project.swf' , 'x': '375 ', 'y': '237', 'link': 'home', 'tween' : {'prop':'y','begin' : '0', 'finish' : '-200' , 'duration' : '1' }}", } 

also formatted json passes http://www.jslint.com/ test never hurts.

var flashvars = {          "xmlfile" : "http://iyt.psu.edu/xml/abington/home.xml",         "preface" : "http://iyt.psu.edu/",         "preload" : "{'url': 'flash/project.swf' , 'x': '375 ', 'y': '237', 'link': 'home', 'tween' : {'prop':'y','begin' : '0', 'finish' : '-200' , 'duration' : '1' }}" } 

but json pasted in looks ok. also, maybe apostrophe included word document.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -