Board Logo

How to add 0
ityouralok - 5/3/2007 at 07:03 AM

Hi,

I need to add 0 before single digit in slider output textbox.
for example if there is 1 then 01 should be appear in textbox
which is attached to slider.

When we change value via slider then then then 0 should appear if value is less then 10 before single digits.

Please help me

Thanks
Alok Verma


tigra - 5/3/2007 at 03:17 PM

in line 99 of slider.js replace
e_input.value = n_value;
with
e_input.value = (n_value >= 0 && n_value < 10 ? '0' : '') + n_value;


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/