Hi All,
Consider some SWFObject code like this:
flashvars.data1 = "{"requestId":14979,"email":"josh@example.com","zip":"12345"}";
flashvars.data2 = '{"requestId":14979,"email":"josh@example.com","zip":"12345"}';
If I host my SWF in IE, FlexGlobals.topLevelApplication.parameters.data1 will be a string, with double-quotes (" entities will be translated to double quotes). However, FlexGlobals.topLevelApplication.parameters.data2 will simply be the one-character string "{".
The opposite is true in Firefox. FlexGlobals.topLevelApplication.parameters.data2 will be a string, with double-quotes (" entities will be translated to double quotes). However, FlexGlobals.topLevelApplication.parameters.data1 will simply be the one-character string "{".
How can I pass a double-quote in a flashvar using SWFObject that works in all browsers? I've been searching on this and haven't been able to find a straight answer...
-Josh
This works in both IE, Firefox, and Chrome:
flashvars.data2 = escape('{"requestId":14979,"email":"josh@example.com","zip":"12345"}');
Is that the way to go if you want double quotes in your string?
North America
Europe, Middle East and Africa
Asia Pacific