You can grab the full html for an element... but to safely pass it (via flashvars or anything else) into flash, you'll need to run it through encodeURIComponent() first.
As for grabbing the innerHTML versus the outerHTML... only IE supports outerHTML. Not even jQuery lets you do this. So, to do so, you need to reference the parent element, and it's innerHTML (or .html() if using jQuery). The problem is of course if the object isn't the only thing inside the parent, in which case you'll need to manually regex filter out the other stuff. Or reorganize your markup to have a dummy container that you can grab it's contents and get only the markup you're after. --Kyle -------------------------------------------------- From: "Chris" <[email protected]> Sent: Wednesday, July 22, 2009 12:54 PM To: "SWFObject" <[email protected]> Subject: Re: feeding replaced content into flashvars > > I'm actually interested (if it is possible) in converting the DOM > object into a string (rather than just it's value), because I'd like > to use it as XML in Flash. > > So, for example, the html I'm trying to pull is: > > <div id="pageTitle"><h2>About Our Partnership & Services</h2></ > div> > > which obviously does have standard html tags. Can those not be > converted to a string? I suppose the quotes around "pageTitle" would > be an issue. I hadn't thought that the tags were a problem. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
