I’m having some issues trying to pass some options into render :update
in my controller:
render :update do |page|
page[‘mybox’].visual_effect( :scale, 200, {:scaleContent => false})
end
this should just scale the box, and not the content, however, the
content scales.
I noticed that the following is produced:
$(“folder-1”).visualEffect(“scale”, 200, {“scaleContent”: false});
I noticed that the scaleContent is in quotes - does that affect the
javascript? In html, I can get it to work by writing:
click me
** note that scaleContent is not quoted…and this works.
Any ideas?
Maybe I didn’t pass in the options correctly in my render :update?
Thanks,
John
John john wrote:
I’m having some issues trying to pass some options into render :update
in my controller:
render :update do |page|
page[‘mybox’].visual_effect( :scale, 200, {:scaleContent => false})
end
this should just scale the box, and not the content, however, the
content scales.
I noticed that the following is produced:
$(“folder-1”).visualEffect(“scale”, 200, {“scaleContent”: false});
I noticed that the scaleContent is in quotes - does that affect the
javascript? In html, I can get it to work by writing:
click me
** note that scaleContent is not quoted…and this works.
Any ideas?
Maybe I didn’t pass in the options correctly in my render :update?
Thanks,
John
Your doing everything right, although it looks as if you prototype.js
may be out of date. Element.visualEffect(“scale”, …) was a recent
addition.
Try doing a “rake update_javascripts” in your app root and then try it
again.
Hi,
Yup, I have the latest script.aculo.us and prototype javascripts, tried
updating everything. Still no luck.
Hoping someone else might have seen this and has a solution…
John.
Alex W. wrote:
John john wrote:
I’m having some issues trying to pass some options into render :update
in my controller:
render :update do |page|
page[‘mybox’].visual_effect( :scale, 200, {:scaleContent => false})
end
this should just scale the box, and not the content, however, the
content scales.
I noticed that the following is produced:
$(“folder-1”).visualEffect(“scale”, 200, {“scaleContent”: false});
I noticed that the scaleContent is in quotes - does that affect the
javascript? In html, I can get it to work by writing:
click me
** note that scaleContent is not quoted…and this works.
Any ideas?
Maybe I didn’t pass in the options correctly in my render :update?
Thanks,
John
Your doing everything right, although it looks as if you prototype.js
may be out of date. Element.visualEffect(“scale”, …) was a recent
addition.
Try doing a “rake update_javascripts” in your app root and then try it
again.