|Categories||Question details Back To List|
Dhtmlx slider: positioning
I have the DHTMLX slider in a web page. It work correctly, but I cannot place it where I want it.
I want to have the slider over a div container that is centered on the web page and less wide than the page. But the slider always count his position from the left of the screen rather than the left of the div container.
Am I missing something or it is not possible to generate the slider relatively to other element ? I have a good knowledge of CSS and XHTML, but I cannot achieve this positioning, so maybe there is bug in the script or the script is not intented to do this kinf of positioning.
Thank you for your help !
Answer posted by Support on Aug 22, 2008 02:16
>>Am I missing something or it is not possible to generate the slider relatively to other element ?
Technically slider can be placed in any container on the page , it will calculate its position in document and will react on events correctly. ( at least it works correctly in local test-cases )
In theory , it possible that you are using some really complex HTML layout and components code can't calculate its position correctly.
If issue still occurs for you - please provide any kind of sample where it can be reconstructed ( you can send it directly to firstname.lastname@example.org )
There were some minor fixed in slider code, latest dev. version attached to post.
Answer posted by Vincent on Aug 22, 2008 06:54
Thank you for your fast reply.
I took the file you posted and it work well. But if I replace dhtmlxslider.js file included by the one posted in "dhtmlx slider Event" former question, the slider cannot be generated at the same place.
So, I was really happy to get an onSlideEnd event from your support, but by the mean time, I had lost the possibility to place the slider where I want it. Could you review the js file that include the onSlideEnd event to make it work correctly in positionning matter ?
Thank you again
Answer posted by Support on Aug 22, 2008 07:38
Actually, the file attached to previous post already supports onSlideEnd event. ( line 307 in attached file )
Answer posted on Aug 22, 2008 08:13
OK, I found it. All is working well now !
Thank you again, you do great job at support !
Answer posted by Vincent on Aug 22, 2008 10:41
Another thing is different with the new js file that include the onSlideEnd event. With the file you posted this morning, the tooltip always display "0" on loading instead of the slider value. The first version that was released with the onSlideEnd event doesn't have this problem. Can it be solved ?
Answer posted by Support on Aug 25, 2008 04:50
Please provide code snippet used for slider initialization, the component works correctly in local samples.
Answer posted by Vincent on Aug 25, 2008 09:39
Here is my files.
live example is here:
error seem to come from line 54 : this.value = min || value || 0
Answer posted by Support on Aug 26, 2008 09:12
Problem confirmed and fixed.
Fix will be released as part of next build. ( fixed js file attached to the post as well )
Answer posted by Vincent on Aug 26, 2008 09:25
Thank you very much ! I'll try it.
Answer posted by Vincent on Aug 26, 2008 14:25
I have unzip and test the later file, but it do not include the onSlideEnd event. Did you fixed this version too ?
Answer posted by Support on Aug 27, 2008 01:37
Updated js file sent by email.
Answer posted by Vincent on Aug 27, 2008 08:28
OK, it work just fine now. Thank you again.