the SmoothScroll class auto links to anchors only and it will not work this way.
Your best bet would be to write your function to use Fx.Scroll instead where you would extract the id from the select value then use Fx.Scroll method toElement() to scroll the page. Checkout the docs for further info on this method http://www.mootools.net/docs. On Dec 22, 4:18 pm, tehprince <[email protected]> wrote: > I current have a page that uses inline links, which I would like to > use smoothscroll on. The problem is my links are with a select box: > > <select onChange="javascript:changeLocation(this)"> > <option>Location</option> > <option value="#atlanta">Atlanta</option> > <option value="#boston">Boston</option> > <option value="#charlotte">Charlotte</option> > <option value="#chicago">Chicago</option> > <option value="#columbus">Columbus</option> > <option value="#dallas">Dallas</option> > <option value="#farmington">Farmington (headquarters)</option> > <option value="#kansas-city">Kansas City</option> > <option value="#new-york">New York</option> > <option value="#philadelphia">Philadelphia</option> > <option value="#san-fran">San Francisco</option> > <option value="#st-paul">St. Paul</option> > <option value="#toronto">Toronto</option> > </select> > > Here's the JS script for "changeLocation": > > <script type="text/javascript"> > function changeLocation(menuObj) { > var i = menuObj.selectedIndex; > > if (i > 0) { > window.location = menuObj.options[i].value; > } > } > </script> > > Is there a way to get the smoothscroll to work with the select from > the drop down box? I've searched all over the place and can't seem to > find an answer. > > Any help would be most appreciated.
