document.getElementById('pageTitle').toString() - does that actually return
what is inside your div? (i.e. do an alert())
I would think that you would be just fine either using .innerHTML() or some
sort of .val() property instead of .toString()?
If toString does in fact properly stringify your output, then I would look
to see if there are any tags associated with standard HTML or XML, you may
need to escape those tag characters (like < and >), so you could use a
variety of techniques with varying success like encodeURIComponent or my
personal favorite, importing a JSON library and just using JSON.stringify().
So try those other methods first, on first glance I would've thought that
your code would try to actually take the DOM object and convert it into a
string as opposed to taking the value inside the DOM Object and turning it
into a string.
Vincent
On Wed, Jul 22, 2009 at 8:39 AM, Chris <[email protected]> wrote:
>
> I've tried posting my issue on a number of forums, and I've received
> no responses. So I must be doing something which isn't typically done
> (and probably for good reason).
>
> I'm trying to take the XHTML content that is being replaced by my
> embedded flash and convert it into a string which I can send into
> flash via flashvars and parse to my heart's content inside of flash.
>
> As an example:
>
> var parent1 = document.getElementById('pageTitle').toString();
>
> var flashvars = {};
> flashvars.parentXML = parent1;
>
> var params = {};
> var attributes = {};
> swfobject.embedSWF("flash/pageTitle.swf", "pageTitle", "510", "150",
> "9.0.0", "expressInstall.swf", flashvars, params, attributes);
>
>
> That first line breaks swfobject. I've also tried:
> var parent1 = document.getElementById('pageTitle').innerHTML;
>
> Either way, it breaks swfobject. So, I assume that I am doing
> something fundamentally wrong. I'm just not sure what or why.
>
> Any ideas what I'm doing wrong, and if there is a way to accomplish my
> goal?
>
> thanks,
> chris
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---