Click to See Complete Forum and Search --> : Help trying to sort data


TonyC
05-17-2004, 05:54 AM
hi people

i have attached my university assignement. please help.

in the htm file i'm trying to sort the data by clicking on the button in the htm file from the xml file. (hope that makes sense)

the problem is it won't sort ... please help.

if you need anymore information about the code just ask and i'll tell you anything.

please help i've got to get this done by friday and i've spent 3 weeks on it already!!!

Khalid Ali
05-18-2004, 01:04 AM
You will need to read the XML document and apply the style to it,however,for sorting at runtime,using JavaScript will come in handy.If you search the webreference.com,I have a detailed solution for this question.

TonyC
05-18-2004, 04:25 AM
hi buddy thanks for your help. maybe i'm being a bit thick but i can't find the article your on about. can you post the link here please?

Khalid Ali
05-18-2004, 10:50 AM
Here is the article link (http://www.webreference.com/programming/javascript/xml/)
This will guide you thru how to read XML file and once you are done doing that then the only thing left will be to sort the results in thepage using JavaScript.thats extremely easy,just put the contents in an array object and use the array objects function sort().
First do the reading the XML file and put it in the format you wish before sorting and then I'll further guide you thru sorting