on 2007-01-21 14:41
on 2007-01-21 15:06
Okey, nevermind that last post, I've found a solution. It's like this; class ...blah.... def someAction @myRvariable = "lala" render :update do |page| page.alert @myRvariable end end end I would be really grateful for explanation of this, I still don't know why it works, and why the previous doesn't. Thanks!
on 2007-01-21 17:34
Hi Ma Mr, Ma Mr wrote: > I would be really grateful for explanation of this, > I still don't know why it works, and why the > previous doesn't. The short answer is that the element (created by link_to_remote) that submitted the request to the server told the server via the message type (XMLHttpRequest) that the browser expected JS, not HTML, returned. Your first attempt used render which returned just the HTML you wanted displayed. Your second returned the HTML along with the JS to display it. hth, Bill