Menu
Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Frontpage Newsgroups
Frontpage Programming
Javascript question...
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Jon Spivey, post: 3970401"] If the user enters leading zeros would it not be easier to remove them in your script rather than ask him to type again? Also to pad a number with zeros you don't need all that elseif stuff with(document.forms[0]){ var x = DASHNO.value, y = 0; while (x.substr(0, 1) == '0') { x = x.replace('0', ''); y++; } DASHNOSORT.value = '0000'.substr(0, 4 - x.length) + x; } Does that do what you need? [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Frontpage Newsgroups
Frontpage Programming
Javascript question...
Top