Skip navigation
Currently Being Moderated

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

Feb 21, 2011 4:15 PM

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

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points