Hi,
Would anyone be able to suggest why the following works in the action
but not when placed in a .js file, called by the action?
It''s the page <<
"$(''basket_popup'').popup.show();" line I''m
interested
in.
def show
respond_to do |format|
format.js do
render :showbasket do |page|
page <<
"$(''basket_popup'').popup.show();"
end
end
end
end
However when I have show.js and remove the block from format.js it
fails. I get a javascript error on the page along the lines of popup
has no properties/attributes?
-show.js-
page << "$(''basket_popup'').popup.show();"
I''m sure it''s a simple one but I can''t see it??
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---