On 2/1/07, Colin Mollenhour <[EMAIL PROTECTED]> wrote:
>
> I don't use Safari so this is a guess based on experience with IE and
> FF, but try putting the update in a try/catch block, I'm guessing that
> some javascript in your responseText has a bug. Try catching the
> exception and printing its details to track it down.
>
> Btw, I always hear people talk about something "crashing Safari". Does
> it literally crash the entire browser or are you talking about it simply
> throwing a javascript error which halts further execution of javascripts
> for that thread?
Problem solved. I think!  Safari would crash with an illegal memory
access being committed by the javascript core thread.  I tracked the
problem down to the stripScripts and extractStrips extensions of
Object.  The specific culprit was/is the regular expression saved in
ScriptFragment: '(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)',  I
changed this reg ex to
'<script.*>(.*)<\/script>' and now safari loads and evaluates my javascript.

Cheers,

Randy

>
> Colin
>
> Randy Jonasz wrote:
> > Hi Everyone,
> >
> > I was wondering if anyone has run into a problem with using Safari and
> > prototype's Element.update() function. I have a web page which has
> > approximately 10 ajax calls.  Each ajax call fills a div in the page
> > with $(div).update(response.responseText); Unfortunately this call
> > crashes Safari.  If I replace the call with $(div).innerHTML =
> > response.responseText Safari loads the page but my javascript is not
> > enabled.  Has anyone got a workaround I may use so I can play nicely
> > with Safari users?
> >
> > Thanks for your help,
> >
> > Randy
> >
> > PS.  I'm using Safari 2.0.4
> >
> >
>
>
> >
>


-- 
Imagine no possessions
I wonder if you can
No need for greed or hunger
A brotherhood of man
Imagine all the people
Sharing all the world
--John Lennon

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to