'select' in RJS


#1

Hi All

I just tried (in a .rjs file)

page[:noq].innerHTML = select(“post”, “person”, 1.upto(10) {|p| [ p, p ]
} )

It didn’t work. I also included the ‘select’ helper in the controller,
but that didn’t help. I have to add that all this works when using HTML
instead of the select helper!

Any suggestion what I do wrong in this select call.

Thnx
LuCa


#2

LuCa wrote:

page[:noq].innerHTML = select(“post”, “person”, 1.upto(10) {|p| [ p, p ]

You probably mean page.replace_html :noq, select…

If that doesn’t work, try :inline => “<%= select… %>”


Phlip
http://www.oreilly.com/catalog/9780596510657/
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax


#3

hmmm, didn’t work, although the ‘text_field’ helper does. I get the
feeling something is wrong with the select statement, suggestions ?

LuCa