I’ve got a link_to_remote that puts a partial render into a div
(“note1”, “note2”, etc.). As part of the display that comes up, I put
in a hide note link (element.toggle). Click that, the div goes away,
everything’s great… except now I can’t get it back.
How can I call the remote AND make the div show at the same time? I see
element.show, but I don’t know how to execute that without having the
user click on it. I looked at the API for update_element_function, but
that looks like I can change the content of the div, or it’s position,
but not hide/show it.
Take your time, take your chances
[3278.7 km, 273.4] Apparent Rennerian
It matters not how strait the gate, / How charged with punishments the
scroll,
I am the master of my fate: / I am the captain of my soul. –
Invictus –
– William E
Henley –
Thanks for the help. You know, I do spend time with the API, it’s
just there’s a lot to learn… I read that section twice, didn’t pick up
on the fact I could be launching other JS actions…
This does work for me btw, but only once. It shows the div, but once I
do element.hide(), this won’t ever show the div again. I ended up using
element.update(‘mydiv’,‘’) as the “hide” action. It works almost as
well.
Thanks again,
Micah
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.