Solved

How to I extract min and max range?

Posted on 2013-05-31
8
531 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
Comment Utility
You need a min class and a max class added to code.
0
 

Author Comment

by:DonHoddinott2
Comment Utility
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
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Defenetely one of the most valued feedbacks i have taken in EE.

Thank you,
Giannis
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now