2009/3/3 Gary Koehl <[email protected]>:
>
> Hello all,
>
> I'm seeing an issue in the latest version of Safari and IE.  Basically
> within a page accessed by ajax.updater, I am trying to run a js script
> with a large amount of json data embedded in it.  I am seeing that it
> works in Firefox, but when I am in Safari or IE the issue arises.
>
> The page called by the ajax would look something like this.
>
> //Get data
> $data = get_data();  // data looks something like data[1000] = array
> ('item1'=>it,'item2'=>it,'item3'=>it)
> $jsonData = json_encode(data);
>
> echo '<script>somefunction('.$jsonData.');</script>';
>
> Now in Safari and IE I'm seeing that if I lower that data array count
> to say 200 instead of 1000, I dont have any issues.  In Firefox,
> regardless of size I see no issue.
>
> I was wondering if there are any known issues when using evalScripts
> of a browser specific limitation on the script size.  Otherwise my
> problem could lie elsewhere.
>
> Any insight is appreciated and thanks in advance.
>
> >
>

I don't know how much of an affect things will have but can you try ...

Don't wrap the code in <script> tags and use a header('Content-type:
application/javascript');

I've recently completed a project using AJAX with JSONP (a big thank
you to this list regarding that little treasure!).

Maybe it will make a difference.

Essentially, if I'm supplying JSON/JSONP/JS/CSS/HTML, then I use the
right http header to reduce the amount of thinking IE has to do. In my
testing I have no issues with FF and Chrome, but IE sometimes needs
things set "just so" to get it to behave.

Richard.
-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to