PDA

View Full Version : Tables and Alphabet


nikwak
02-27-2015, 10:48 AM
I have completed a site with Dreamweaver using PHP coding (due to the shopping cart and search engine being used) The content on each page is contained in a table and I would like to put that info into an alphabetic order. Have tried the Commands Sort Table but it always throws up an error message saying that the object at line 163 of the Sort Table.js is not currently contained in a document. I suppose this to be something regarding the php but don't know how to change it. Could someone help, please?:?:

edbr
02-27-2015, 11:09 AM
Need to see sone code as my crystal ball is still in the cleaners :)

nikwak
02-27-2015, 12:11 PM
Here is the part of the code the error message points toward:


// Sort the rowArray, based on sort key
rowArray.sort(compareCallback);

// Copy the contents of the sorted rowArray back into the HTML document
for (i = 0; i < rowCount; i++) {
currRow = rowIter.item(i+skippedRows);
if (bMoveRowAttrs){
160 currRow.outerHTML=rowArray[i][0];
162 }else{
163 currRow.innerHTML=rowArray[i][0];
164 }
}
}


I have tried to copy the whole code and send it but it won't allow me to, as it is over the permitted limit for attachments.

If that isn't enough to see what is happening then I could always give a link for the whole script

nikwak
02-27-2015, 12:11 PM
btw - I have inserted those row numbers, they aren't actually part of the script :)

edbr
02-27-2015, 11:50 PM
The content on each page is contained in a table and I would like to put that info into an alphabetic order.
yes i need to see more than that.

edbr
02-28-2015, 02:25 AM
moving this to javascript

nikwak
02-28-2015, 09:59 AM
I don't know why but it worked this morning. I'm sorry to have wasted your time. I think I'll just leave it - a case of: if it ain't broken don't fix it

Again, many apologies
Nick

edbr
03-02-2015, 12:23 AM
No problem. :)