[CASE OPENED]Setting a Default Range of values with a slider control in HTML Composer
Is there a way to set a default range for the slider control in the HTML Composer? I need for the slider to be forced to its min and max range on load.
I have tried the below javascript addition in the onInitialUpdate()
But all this does is place the max value in the value box. The slider itself stays set at 0 - 0.
Thanks,
MaritaThis message has been edited. Last edited by: FP Mod Chuck,
WebFOCUS 8.2.02M Windows Server/8.2.02M All Outputs
April 16, 2019, 02:10 PM
MartinY
From a static slider (set to range from 0 to 200 step 10), the below work perfectly
function onInitialUpdate() {
IbComposer_setCurrentSelection('slider1', 120, false);
}
And the default value can be anything up to 200 from the moment it's a multiple of 10. But even that, I can set it at 125. Will not be able to select it again from the slider since the step is by 10, but can be typed in the selection box
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
April 16, 2019, 02:59 PM
MReeder
Martin,
I have tried that but i only sets the box to a value of 120. The slider still remains at 0. Plus this is a range which needs the slider_from and slider_to to be set.
I am not sure how to upload an image to show what I mean but it will visually not work as programmed.
Thanks,
WebFOCUS 8.2.02M Windows Server/8.2.02M All Outputs
April 16, 2019, 03:18 PM
MartinY
Here is my HTML code where only a slider is defined with a range from 0 to 200 and default to 120
From client, select the Public folder, right click on folder and select New / Text Editor. Paste the code and save it with htm extension. Then refresh your folder in AS and you will be able to see it with HTML Composer
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
April 16, 2019, 03:33 PM
MReeder
Martin,
Yes this works great for a single slider. I am using a double slider. If you set properties/miscellaneous/Range to yes then it no longer works. The slider does not know which head to slide for the default number.
There must be something which says slider1_to and slider1_from but I have not been able to find enough documentation to determine the name for these values.
Thanks for your help!
WebFOCUS 8.2.02M Windows Server/8.2.02M All Outputs
April 16, 2019, 03:49 PM
MartinY
Sorry, my bad. I haven't realized to you were using the range option.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
April 16, 2019, 03:55 PM
MReeder
That is ok. I have searched all the technical content and have found no way to distinguish between the range of values to set the defaults. I'm going to open a case too and see if that will find an answer. If it does I will post it back to this chain.
WebFOCUS 8.2.02M Windows Server/8.2.02M All Outputs
April 18, 2019, 05:09 AM
Addy
Hi, Can you use Dynamic Slider instead of the static one?
Dynamic slider will give you an option to set you starting point to where you want..
WF 8.2.04 Windows/Unix All Formats In Focus since 2006