Select onchange question


#1

I have this select statement, trying to change to a page that is the
value of the select:

<%= select(:node, :id, $shelves,{:prompt =>‘Select Equipment’},
{ :onchange => "document.location.href = ‘/buildshelf/’ + $F('node_id
').value + ’ "} ) %>

How do I make this happen?


#2

What is the HTML that is rendered from that?

Groove


#3


#4

Can you see the problem there in the rendered HTML?

Groove


#5

Well I did this:
:onchange => "document.location.href = ‘/buildshelf/’ + $F
(‘node_id’).value + "

for the onchange part and I get this for html, still puzzled:


#6

couldn’t you just do something like:

onchange=“document.location.href = ‘/buildshelf/’ + this.value”

Groove


#7

Of course, but I would have to pull my head out of my butt first. DOH!