If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Users who have thanked Old Pedant for this post:

Old Pedant - There is a slight snag in that if the user correctly fills in ranks 1-5 the Submit button then becomes enabled, but the user can then erase one or more rankings or press the Reset button and the Submit button is still enabled.

I have. As a user of the site, I was receiving a lot more pop-up error message with your code, than using the Old Pedant code.

For example:
When I enter 1 - 5 into the first five boxes using the tab key to advance between them. I get down to Item6 and the submit button is active. If I continue using the tab key to advance through the rest I get a pop-up for each time, because the fields are blank.

When I try to re-rank Item4 (which = 4) and Item5 (which = 5) and I clear Item5 and Shift + Tab up to Item4, I get another pop-up when I leave Item5 for it being blank. Then I change Item4 to be 5 and Tab back to Item 5 and change it to 4.

Then I just randomly switch between fields using my mouse. And a "NaN" appears in one of the boxes and I get several pop-ups "That number is already taken" as well as "Only Numbers 1 - 5 are allow".

All in all there are way to may times that the user has to acknowledge a pop-up for doing what I feel are normal functions of this type of site. In my mind the user does not need to see a pop-up every time they change their rankings.

I got the Old Pedant to give me the NaN, but it cleared it within a blink of an eye.

The only issue that I have with Old Pedant code is that is does not disable the submit button if I clear a rank from a previous field.

What would you have done with that Javascript debugger, if you are willing to use a whole different script with possible errors, just because you don't want to modify one line of code in a script that's working perfectly well?