Thanks Dan - works perfectly now !.

On Dec 20, 7:14 pm, "Dan Dorman" <[EMAIL PROTECTED]> wrote:
> On Dec 20, 2007 11:29 AM, bbbs <[EMAIL PROTECTED]> wrote:
>
>
>
> > For the table that appear on the left hand side click one of the
> > information bubbles - a javascript error occurs saying it can not find
> > the 'splitInfo' function. This javascript function is part of the html
> > inserted when the table is requested.
>
> > The AJAX call is performed with code like this :
>
> >       new Ajax.Request('selContainer', '/htmlblock.php?id=12345 ?>',
> >       {
> >       method: 'get', evalScripts:true,
> >       onComplete: hideActivity
> >       });
>
> > I thought the 'evalScripts' parameter ensured that any JavaScript in
> > the returned HTML was evaluated, but that does not appear to be the
> > case here.
>
> Check the documentation at <http://prototypejs.org/api/ajax/updater>;
> it describes how to declare functions in external files if you want
> them to work with Ajax requests.
>
> Basically, you've got to be rather particular with how you declare
> functions. Make sure you're doing THIS:
>
> splitInfo = function() {
>  // contents
>
> }
>
> ... instead of this ...
>
> function splitInfo() {
>  // contents
>
> }
>
> Hope that helps.
>
> :Dan Dorman
--~--~---------~--~----~------------~-------~--~----~
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