Solved

How to I extract min and max range?

Posted on 2013-05-31
8
563 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will learn how to dynamically set the form action using jQuery.
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…

756 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