fryn / html5slider

<input type=range> polyfill for Firefox
http://fryn.github.io/html5slider/
180 stars 48 forks source link

Value Issue in FF7? #3

Closed d-a--0 closed 12 years ago

d-a--0 commented 12 years ago

I searched the web high and low for a solution to add a range-slider to firefox. And I found the html5slider which works "partly" for me (but still more then other "solutions"). On my Site I wanna use the rangeslider for the forminputvalue (name="amount") for a paypal donation.

This works in Opera and Chrome, but in Firefox it only passes the value I specified in the HTML-Code, rather than reading the value from the slider. I use the slider inside a Modal window (jQuery simplemodal) but I tried to but it "outside" and even deactivated all other js to make shure ther is nothing interfering. It allwas passes 1.50€ in Firefox. And it allways works in Chrome and Opera.

Another issue exists there with displaying the chosen Value live: This works like a charm in every browser - but if I but the thing inside a modal window (tried a few different modalwindow-plugins) the span simply shows the default value (1.50€). This is in every browser I tested.

Although I would be very pleased if only the pass-value-to-paypal-issue in Firefox would work. I tried a few things but I don't get it to work. Atm I don't have the time to test it more precisely.. but I thought that it could help someone with the same issues.

To see for your self you can look on my Netlabel (Work in progress) here: http://wdrstndnetlabel.at/catalogue Just klick on the download-button, cancel the download and a modal window with the rangeslider opens, chose a range and click "donate". This will take you to the paypal-checkout site where you see the chosen value (not in Firefox, IE not tested yet).

Thank you for sharing a great plugin ; ) d_a__0

fryn commented 12 years ago

I investigated the issue and fixed it (I hope!). The file, html5slider.js, has been updated in the repository.

For those who are curious about the required change, check out the commit here: https://github.com/fryn/html5slider/commit/733a999989e0d9e6fe08b8f9503923082769cf93 It turned out that browsers use an internal value when submitting forms, not the actual value property. I just needed to synchronize the internal value with the value that is displayed.

Thanks for trying out html5slider and for providing this useful feedback! :)

Frank