On Jul 12, 8:06 am, rockrep <[email protected]> wrote:
> We have an issue where we are using RJS templates to render the
> results of Ajax calls.   Everything works fine so long as the user
> waits for the render to occur.   However, if the user initiates the
> request and the RJS template is still in the process of rendering, but
> hasn't completed, and the user clicks a different link, then we get a
> Javascript alert popup "Unexpected Server Error" for each line of RJS
> that has not yet completed.   There is no stacktrace in the
> development (or production) log.   Once the alert(s) are cleared, the
> secondary request completes fine.
>
> What is best practice for guarding against this situation, or at a
> minimum prevent the alert popup?   We tried putting begin/rescue
> blocks around the RJS but that did not seem to help.
>
If the errors are javascript errors then it's normal that trying to
rescue things in the RJS did nothing: your rjs template just generates
javascript that is executed by the browser at a later point in time.
Have you tried using firebug (or similar) to work out what is actually
happening?

Fred
> Any pointers appreciated.
>
> Thanks,
>
> Michale
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to