Re: [Rails] Javascript to access a server side element in rails

2010-01-09 Thread Conrad Taylor
On Thu, Jan 7, 2010 at 9:45 AM, nisha wrote: > Hi all, > > TestController > > def show > @object = Object.find(params[:id]) > end > > I have show.html.erb which has the foll js in the head > > >$(document).ready(function($) >{ >$("#divcontain

Re: [Rails] Javascript to access a server side element in rails

2010-01-08 Thread Narendra Kumar Payidiparthi
nisha, Did you try with <% %> or <%= %> tags in the html.erb. Something like <%= @object.attribute %> I am not sure , what problem you are facing? Regards, Naren On Thu, Jan 7, 2010 at 9:45 AM, nisha wrote: > Hi all, > > TestController > > def show > @object = Object.find(params[:id]) >

[Rails] Javascript to access a server side element in rails

2010-01-07 Thread nisha
Hi all, TestController def show @object = Object.find(params[:id]) end I have show.html.erb which has the foll js in the head $(document).ready(function($) { $("#divcontainer").load("first.html.erb"); var refreshId1