Solved

How to I extract min and max range?

Posted on 2013-05-31
8
548 Views
Last Modified: 2013-06-04
I've managed to get egorkhmelev's jslider http://egorkhmelev.github.io/jslider/ displaying properly, but I'm a bit of a noob, and am unsure how to extract both min and max values from the range, so that I can use it in a query.

This is what I have so far: http://jsfiddle.net/HKhBH/

I'm using this in an asp.net MVC solution with C#, if that helps any.

TIA!
0
Comment
Question by:DonHoddinott2
8 Comments
 
LVL 16

Expert Comment

by:joinaunion
ID: 39211715
You need a min class and a max class added to code.
0
 

Author Comment

by:DonHoddinott2
ID: 39211721
I don't know how to do that. Noob, remember? And would that already be built into the slider, and I would just have to call upon these class ranges?
So is it just a matter of calling these classes, not actually building them?
0
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 39217391
the min and max values are the 'to' and 'from' values that you set.

What are you trying to achieve?

(btw, the jsfiddle doesn't work)
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 500 total points
ID: 39218198
Hi,

Can you check this jsfiddle.

I had posted that a couple of weeks ago in another EE issue, you may find here.

Edit

In my example you can see that i have the following bit of code:
            callback: function(value)
                {
                    jQuery("#LowerBound").val(jQuery("#Slider2").slider("calculatedValue").split(";")[0]);
                    jQuery("#UpperBound").val(jQuery("#Slider2").slider("calculatedValue").split(";")[1])
                }

Open in new window


This uses the callback of the slider in order to populate the two textboxes. If you check the documentation, you'll see that callback fires on mouse up. Then i use the "calculatedvalue" which returns an array that holds the selected min and max values. Getting the 0 index of the array we have the min value and the 1 index is the max value...

Giannis
0
 

Author Closing Comment

by:DonHoddinott2
ID: 39219782
I'd like to thank Giannis for taking the time to write out a comprehensible, and detailed answer that solved my problem perfectly. I'm often extremely disappointed in the answers provided, as they are typically unmotivated, one-liner answers that only serve to frustrate. Again Giannis, thank you very much, it means a lot to me.
0
 
LVL 23

Expert Comment

by:Ioannis Paraskevopoulos
ID: 39219873
Defenetely one of the most valued feedbacks i have taken in EE.

Thank you,
Giannis
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question