PDA

View Full Version : need code for this



hotrattz
09 Jun 2010, 11:18 PM
HELOO

I'm a noob doing some work for a friend i need the "sortOrderOnLoad: "descending"}) to use all 4 first digits of this kind of info

price range 300-1000

currently it's only sorting the first diget

so its show like this;

price range 300-1000
price range 1000-2000

i need to look like this

price range 1000-2000
price range 300-1000

i know the answer has to be some easy code that i'm just not aware of can anybody help?
here is the code;



<!--
var catalog = new Spry.Data.XMLDataSet("Rambod_catalog.xml", "FMPDSORESULT/ROW", {sortOnLoad: "price_range", sortOrderOnLoad: "descending"});
catalog.setColumnType("Item_Code_Number", "number");

function filterCat(dataSet, row, rowNumber)
{
var x = "Science";

if (row["Category"] == x)
{
return row;
}
else
{
return null;
}
};