Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread Poll:
Author: Subject: Can I lock the slider, i.e. use it for display only?
Martha
Junior Member

Posts: 3
Registered: 6/15/2007
Location: Pennsylvania
Member Is Offline
posted on 6/15/2007 at 01:24 AM Reply With Quote
Can I lock the slider, i.e. use it for display only?


We're using the slider as a "visual analogue scale", where we're not really interested in the value returned as a number, just as a position along the scale. This is easily done on the input side: we've connected the slider to a hidden input field, so the user only sees the slider, with no numbers in evidence whatsoever.

We'd like to display the results using the same slider, but we don't want the viewer to be able to move the knob. Is there some way to lock the slider, or set it to readonly, or something like that?
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 6/15/2007 at 05:12 AM Reply With Quote

Just kill all the events handling in the control by removing mouse events attributes from the HTML inside the slider (i.e. onmousemove, onmousedown etc)
View User's Profile View All Posts By User U2U Member
Martha
Junior Member

Posts: 3
Registered: 6/15/2007
Location: Pennsylvania
Member Is Offline
posted on 6/15/2007 at 02:12 PM Reply With Quote

Thanks for the reply, but I'm afraid I need a bit more basic help than that. :/ Javascript really isn't my thing - mostly, I use vbscript. (I know, I know, heresy, but there you have it.)

I'm not referencing any mouse events in my HTML - there's nothing I can remove. Is this something I need to edit in slider.js? I was hoping I didn't need to do that, partly because Javascript really isn't my thing, and partly because I would prefer not to have two versions of the script.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 6/15/2007 at 02:53 PM Reply With Quote

The script isn't designed for the behavior you require so the changes to slider.js are needed. You can find the HTML code inside that file (lines 35 & 36). If you also need responsive slider you'll end up with two versions. You can submit a customization request and we'll create special version for you that can be configured to not react to user actions.
View User's Profile View All Posts By User U2U Member
Martha
Junior Member

Posts: 3
Registered: 6/15/2007
Location: Pennsylvania
Member Is Offline
posted on 6/15/2007 at 03:23 PM Reply With Quote

Line 35... lessee... aha, this must be it:
onmousedown="return f_sliderMouseDown(' + this.n_id + ')"

I removed that bit from the img tag, and now the sliders do (or rather, don't do) exactly what I want them to do (or not do). Thank you!

(I also had a bit of a headache figuring out why I was getting "cannot find the input with NAME=s3" errors - turns out it was because my viewer page didn't have a form around the input controls. Duh! Just 'cause they're hidden doesn't mean they don't need to be in a form. :)
View User's Profile View All Posts By User U2U Member
Post new thread Poll:

Related Links:
Product Page
Product Demonstrations Live Demos
Multiple Designs
Equalizer
Free Download Free Download
Product Documentation Documentation:
Documentation Page
Change Log
Support Forum Support Forum

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004