Forum: Ruby on Rails built-in dropdown jumps?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
241b11f59c4bcfc2ce84a43f52b30001?d=identicon&s=25 Sean Cahoon (osakaboy)
on 2006-06-08 11:16
Hey everybody! I was just wondering if Rails' javascript library
includes something as simple as making a dropdown that jumps to the link
when selected without needing a "submit" button. I see a bunch of AJAX
effects and draggable-element stuff, but all i need is a simple
dropdown... should I code it myself?
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (Guest)
on 2006-06-08 17:06
(Received via mailing list)
use prototype's Element.scrollTo() function

<select onchange="Element.scrollTo(this.options[selectedIndex].value)">
<option value="item1">Item 1</option>
<option value="item2">Item 2</option>


<div id="item1">...</div>
<div id="item2">...</div>
This topic is locked and can not be replied to.