html5 - Javascript/HTML 5 Slider steps issue -
i have html 5 slider designed (or should be) change width of line in canvas im painting app im creating. have issue. on moving slider initial position jumps middle i.e. 5 , stuck there, removing steps numbers 1-10 in between. below code have:
html:
<input type="range" name="penwidth" id='penwidth' min="1" max="10" value="1" step="1" onchange="this.value='';" /> <span id="range">1</span> js:
function brushwidth() { var varwidth = document.getelementbyid('penwidth').value; context.linewidth = varwidth; document.getelementbyid("penwidth").value = newvalue; } when slider in 1 (default position line daw 1 width , when move , jumps position 5 line width of 5 know works fine slider having problem. if remove following html code slider moves in steps fine nothing:
onchange="this.value='';" i have uploaded files server can see whats going on im using chrome - http://marksblog.co.uk/canvas/
remove line 268 causing js error removing onchange="this.value='';" within input element , should resolve problem in chrome
Comments
Post a Comment