Hey gang -
I''ve got an existing set of functions (using Prototype 1.5.1 and
ColdFusion) to handle a graphic preview; I''ve got a select element
with a list of folders/files within. An onChange on that select
element fires off a function which (using Ajax.Request) taps my ajax
code, which returns the requested data in a JSON structure,which then
passes the incoming JSON content to a second function, where said
content is pulled out using evalJSON() and then a div is updated based
on the data in the JSON structure.
Now I''m trying to rework this, to use FCKEditor''s file
browser. I''ve
got that bit working fine - the browser window pops up, I can choose a
file, it passes its data back fine. The trick is getting the graphic
preview to work using this method.
My main previewing code works great, up to the point of the evalJSON()
call in the second function - it simply dies at this point.
Using Firefox/Firebug, I can look at the incoming JSON structures of
both the old solution and the new - and aside from the div ID being
passed (as far as which div to update), choosing the same graphic
using both methods yields identical JSON structures - or at least they
appear to be identical.
Prior to the evalJSON() call, doing alerts on just retValue (varname
being used for the incoming content) yields ''[Object
XMLHttpRequest]''
with both old/new methods. However, doing an alert on
retValue.responseText (which is what''s evalued with the evalJSON()
call) yields the JSON content as text with the old method, but NO text
(at least, nothing visible) with the new method. Doing an alert of
retValue.repsonseText.length yields an expected length value with the
old method, and zero with new (despite the obvious presence of content
when looking at the ajax call via Firebug).
I can''t for the life of me figure out what the difference here is.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---