dweb Posted June 21, 2013 Share Posted June 21, 2013 hey all i have a html form and my input field looks like; <input id="fieldx" value="1,0,23,0,99"> the value changes each time, but that gives you an example As you'll see, I have 0's in the input field Inside a function, what i want to do is run the following var elm = document.getElementById('fieldx').value; then strip any 0's from that input field, and output the new value using document.form.fieldx.value = stripped_zeros; so the output would look like <input id="fieldx" value="1,23,99"> can anyone help? thanks Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.