-
1. Re: Javascript, Client side validation???
tjakopec Aug 21, 2007 12:17 AM (in response to psuross)function validateSliders(){ var e = document.getElementById("frmMap:redSliderInput"); alert(e.value); }
-
2. Re: Javascript, Client side validation???
tjakopec Aug 21, 2007 1:27 AM (in response to psuross)Surfing to find something else I come across this
https://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/FAQ.html
5.23. How to retrieve the current value from the inputNumberSlider?
take a look[/url] -
3. Re: Javascript, Client side validation???
psuross Aug 21, 2007 7:51 AM (in response to psuross)Thanks for the info.
One followup, how then do I set a value on another inputNumberSlider? -
4. Re: Javascript, Client side validation???
tjakopec Aug 21, 2007 8:21 AM (in response to psuross)I didn't tested but it will goes like this
function validateSliders(){ var first = document.getElementById("frmMap:redSliderInput"); var second = document.getElementById("frmMap:redAnotherSliderInput"); second.value=first.value }
-
5. Re: Javascript, Client side validation???
psuross Aug 21, 2007 2:24 PM (in response to psuross)How can I force an update of the slider bar? I am getting a proper value to pass back and forth between the components and the correct values are showing in the text area, but the indicator on the slider bar does not update unless there is a tab or carriage return. I have tried concatenating the value with a \r or \t, but that does not seem to cause the refresh of the GUI portion of the slider.
-
6. Re: Javascript, Client side validation???
tjakopec Aug 23, 2007 1:40 AM (in response to psuross)Have you try to rerender entire component them after javascript action (onchange) is call.
something like this (haven't tested)<rich:inputNumberSlider width="500" step="20" minValue="0" maxValue="500" value="0" showInput="false" showToolTip="false" showBoundaryValues="false"> <a:support event="onchange" reRender="anotherSlider"> <a:actionparam value="#{bean.firstSliderValue}" assignTo="#{bean.anotherSliderValue}" /> </a:support> </r:inputNumberSlider>
The solution isn't javascript but I thing it should work!