View Single Post
  #2 (permalink)  
Old June 8th, 2005, 04:27 AM
joefawcett's Avatar
joefawcett joefawcett is offline
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Shouldn't you be passing 'i' as the second parameter if you want a numeric sort?
As a side issue never use parseInt without the secoond argument:
Code:
var int = parseInt(value, 10);
NOT
Code:
var int = parseInt(value);
if you don't specify you can weird results try:
Code:
alert(parseInt("08"))
for instance.
Better to use Math.floor(value) instead anyway.


--

Joe (Microsoft MVP - XML)
Reply With Quote