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?
What is the HTML that is rendered from that?
Groove
<select id="node_id" name="node[id]" onchange="document.location.href
= '/buildshelf/' + $F("node_id").value + ">
Can you see the problem there in the rendered HTML?
Groove
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:
<select id="node_id" name="node[id]" onchange="document.location.href
= '/buildshelf/' + $F('node_id').value + ">
couldn't you just do something like:
onchange="document.location.href = '/buildshelf/' + this.value"
Groove
Of course, but I would have to pull my head out of my butt first. DOH!