1 Reply Latest reply: Feb 21, 2011 4:15 PM by JoshBeall RSS

    Pass double-quote inside a string via flashvars and SWFObject?

    JoshBeall Community Member

      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