why is dropdown value 0 being ignored?

freezer 04 Nov, 2010
I have a quantity dropdown containing options 0,1,2 till 9. This results in this code:


<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>


As you can see, value 0 is missing, is this a bug?
I know I can change the generated html code, but that's not what I want to do.

Any suggestions? thanks.
GreyHead 04 Nov, 2010
Hi Freezer,

It's a bug. Not one I've seen reported before though.

The only workaround I could see was to put the values in quotes '0' '1' - then it's OK but not quite what you want.

Bob
freezer 05 Nov, 2010
Thanks GreyHead. Your support on this forum is awesome.

As a workaround I used the O instead of 0 (zero). In my javascript I replace the O by 0 (zero) before doing any calculations.

Regards.
GreyHead 05 Nov, 2010
Hi Freezer,

Thanks for the thanks, much appreciated.

Looks like you have a good workaround there.

Bob
This topic is locked and no more replies can be posted.