Hi Guys,
Sb could help me in this problem?
I have an partial that I pass some parameters…
I need to create many partials by click event of a link, How can I do
that?
Hi Guys,
Sb could help me in this problem?
I have an partial that I pass some parameters…
I need to create many partials by click event of a link, How can I do that?
I tried to do like this way
But it does’nt work…
Do you get an error, or just no text in partialtestdiv?
Hmmmm…
Ok, I will try do this using an ajax call…
But How can I pass object references using an ajax call? Is it possible
in
rails or I need pass object attributes by JSON?
Thx
Hmmmm…
Ok, I will try do this using an ajax call…
But How can I pass object references using an ajax call? Is it possible in
rails or I need pass object attributes by JSON?
I believe that’s what the ‘data’ argument of the .load function is
supposed to be used for. Make a simple test using a string and see
what you get in the params hash on the server.
The onclick is executing in the browser so you’re not going to be able
to use erb in it. You’ll want to make an ajax call (.load is a handy
shortcut for this) to the server where you can render the partial
using erb to get the html you need returned.
Hmmmm…
Ok, I will try do this using an ajax call…
But How can I pass object references using an ajax call? Is it possible in
rails or I need pass object attributes by JSON?
I believe that’s what the ‘data’ argument of the .load function is
supposed to be used for. Make a simple test using a string and see
what you get in the params hash on the server.
If you’re not already using them, I find both the Firebug and Live
HTTP Headers plug-ins indispensable for exploring ajax calls.
Bill
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.