Hi Everybody,
I am having a tough time in figuring out how to pass ‘this’ java script
keyword as a parameter to a java script function in page.call.
For instance, in my RJS template I want to do this:
page.call “myFunctionName”, this
Any help in much appreciated!!!
Thanks!
-Amit.
On May 25, 8:49 pm, Rails L. [email protected] wrote:
Hi Everybody,
I am having a tough time in figuring out how to pass ‘this’ java script
keyword as a parameter to a java script function in page.call.
For instance, in my RJS template I want to do this:
page.call “myFunctionName”, this
For starters you can use page << to insert an arbitrary fragment of
javascript (and if you find yourself fighting rjs to much you may want
to just drop it altogether). You could also try page.call ‘foo’,
page.literal(‘this’)
Fred
Thanks Fred!!!
“page.literal(‘this’)” did the trick.
I am working on a fast track project and didn’t had much time to figure
this out.
I heartily appreciate your reply.
Thanks a lot!!!