RE: Returning Javascript

Ryan Gahl
Tue, 14 Mar 2006 15:18:43 -0000

When defining the functions, store them in variables...



myFunc = function() {

            //...etc...

}





That SHOULD work, but others have mentioned having to go the extra step
of assigning them to the window object (which I''m almost convinced in
unnecessary but I don''t use the prototype AJAX stuff - not flexible
enough for my needs). So if the above still does not work, try...



window.myFunc = function() {

            //...etc...

}



________________________________

From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]
On Behalf Of Aaron
Meier
Sent: Tuesday, March 14, 2006 9:15 AM
To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails-spinoffs] Returning Javascript



I have a page with some links on it that when clicked, loads a
"subpage"
in a div.  This subpage contains some html and javascript.  I see how
using ajax.updater with evalscripts will run any standalone javascript
on the subpage, but I do not have access to any of the javascript
functions on that subpage.  Is there some way I can make those
javascript functions available to the page?  thanks for any help!


The information transmitted in this electronic mail is intended only for the
person or entity to which it is addressed and may contain confidential,
proprietary, and/or privileged material.  Any review, retransmission,
dissemination or other use of, or taking of any action in reliance upon,
this information by persons or entities other than the intended recipient
is prohibited. If you received this in error, please contact the sender and
delete the material from all computers.