| Page 1 of 1 | [ 2 posts ] |
Tony de Leon Suero
|
Hello From Santo Domingo !! , I need your help please.
I'm using an Horizontal Slider with two thumbs YUI 2.9.0, but I insert the code on a search form inside of an Ajax Update Panel. The slider is working good but when I click the submit button of the form the slider freeze and doesn't work. What can I do to resolve that ? This is the code of the Slider I'm Using Code: <script type="text/javascript"> (function () { YAHOO.namespace('example'); var Dom = YAHOO.util.Dom; var range = 200; var tickSize = 0; var minThumbDistance = 10; var initValues = [100,130]; var cf = 900/(range - 20); var convert = function (val) { return Math.round(val * cf + 100); }; YAHOO.util.Event.onDOMReady(function () { var demo_bg = Dom.get("demo_bg"), info = Dom.get("infoprice"), from = Dom.get("fromprice"), to = Dom.get("toprice"); var slider = YAHOO.widget.Slider.getHorizDualSlider(demo_bg, "demo_min_thumb", "demo_max_thumb", range, tickSize, initValues); slider.minRange = minThumbDistance; var updateUI = function () { from.value = slider.minVal; to.value = slider.maxVal; var min = convert(slider.minVal), max = convert(slider.maxVal - 20); info.innerHTML = "MIN: <strong>" + min + "</strong><br>" + "MAX: <strong>" + max + "</strong>"; demo_bg.title = "Current range " + min + " - " + max; }; slider.subscribe('ready', updateUI); slider.subscribe('change', updateUI); YAHOO.util.Event.on('demo_btn','click',function () { var min = Math.abs(parseInt(from.value,10)|0), max = Math.abs(parseInt(to.value,10)|0); if (min > max) { var hold = min; min = max; max = hold; } min = Math.min(min,range - 30); max = Math.max(Math.min(max,range),min + 20 + minThumbDistance); }); }); })(); </script> |
|
This is just the example code. Likely your issue is coming from the code that's related to handling the form submission.
|
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group