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.
Sean C. (Guest)
on 2006-06-08 13: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?
Chris H. (Guest)
on 2006-06-08 19: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.