Hi everyone, I’m looking for solution how to create (double) range slider. It should independently (different ratios) change numbers in two text boxes when dragging an element (ellipse). I’m attaching a picture to explain visually, what I mean.
Any suggestions highly appreciated. Thanks!
BTW: There is nice script for that (http://rangeslider.js.org), but I can’t figure out out how to implement only the needed parts into hype document.
Wow, that was fast. Works like charm - thank you!
Can I ask: would there be a way around html head css / javascript injection?
(The output of hype document will be div living in html page which I won’t have full/permanent control over).
Thanks again!
One more question… : )
Would there be any way how to change the ratio by clicking an object/button? (to have three of them actually)
I guess there would have to be a variable that would change on click, but I can’t make it work (surprisingly…)
Now create a new Hype function timesAmount with this code
var amounts = {ten:10,twelve:12}
window.amount = amounts[element.id];
var value = document.querySelector('#range').value
hypeDocument.functions().outputUpdate(hypeDocument,element,value);
Then asking the buttons mouse clicks to the timesAmount function.
The new function will set the new amount to use and also call the first function to make an update.
Thanks Mark! For some reason I can’t make it work. I understand the way of picking of values and sending them back to outputUpdate, but for some reason clicks doesn’t see / set them (undefined / NaN). I suppose I’m not setting correctly range input in the innerHTML… I’m attaching a file if you could please have a look.
Thanks! InputRagne_mh2.zip (202.8 KB)
Amazing, works flawlessly now! (I even had once the innerHtml id correctly be but deleted that later.) With some icons and little animation it should serve as little travel expenses demonstration) pretty well. : ) Thanks a lot!
Hi Mark, hello evyrobody. It turned out that range slider unfortunately doesn’t work in internet explorer, which is required - grrr : / Css styling isn’t an issue, but the numbers doesn’t update on range slider drag. Any suggestions appreciated!
Thanks Mark. I’m trying it out on IE 11 + MS Edge. Thy styling of the range works fine, the slider itself see the values but they aren’t red by text fields : / Sample file attached, any help appreciated. Thanks.InputRagne_4.zip (227.7 KB)