We've been experiencing problems transferring long chunks of data through the Application.ExternalCall method. it seems like there is a hard limit to the number of bytes that can be pushed to JavaScript. This is NOT a limitation on the JS side. We have successfully sent the same data to and from other embedded objects (ex: SWF to SWF). Our research has yielded a result of around 12560 bytes. I would like to know, if this is a known issue... and if so, what is the real limit?
and oh yea: The method doesn't properly escape the characters passed to it. It seems that it escapes quotes (" => \") as expected, but does not escape slashes and/or line breaks (\, , ,\r,\f) which causes an unterminated string error on the JS side. Not to mention any text that already contains escaped characters breaks (example: \" => \\" should be: \" => \\\"). There are 2 (that we can think of) workarounds for this:
Escape them (the slashes and line breaks) ourselves (but NOT the quotes) before they get passed through the Application.ExternalCall or
Use the WWW.EscapeUrl method to URL encode the value and decode them on the other side
Both of these methods seem to work, but the url encoding adds a considerable amount more characters to what we are sending. Thus, reducing the amount of data we can actually send at one time.
Has anyone else dealt with this?