Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy need a way to sort my table..

    i have this table with 2 columns

    1st column::has a image of a book and a price
    2nd columns::has the title of book, some detail abt the book nd the authors name

    here is wat i m trying to do.. i want to be able to sort the table according to the price, title nd authors name.

    I hav found many scripts for sorting table but cant get any of them to work with my table mainly because the way the details are distributed in my table.. but its really not possible for me to insert any new columns..nd desparately need a way to sort the table..some help please .

    here is how my table is:

    Code:
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id=dataTable>
    	<tr> 
     		<td width="14%" height="149" align="center" valign="middle"> 
    		  <img src="biogra/TisHerself.gif" height="90" width="68">
    		  <br>Our Price: <font color="#FF0000">$17.50</font>
    		</td>		                        
            <td width="86%" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
              <strong>Title:<a href="#">'Tis Herself</a></strong>
    		  <br>An exquisite Irish beauty whose film career has spanned<br>
              <em>Author:<font color="#FF0000">Maureen O'Hara</font></em></font> 
            </td>
    	</tr>
    	<tr> 
    		<td width="14%" height="149" align="center" valign="middle"> 
              <img src="biogra/DebraGinsberg.gif" height="90" width="68">
    		  <br>Our Price: <font color="#FF0000">$16.76</font></p>
    		</td>		                        
            <td width="86%" valign="middle"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> 
               <strong>Title:<a href="#">About My Sisters</a></strong>
    		   <br>Chronicling a year in the life of her close-knit clan
    		   <br><em>Author:<font color="#FF0000">Debra Ginsberg</font></em></font>
    		</td>
    	</tr>
    </table>
    Last edited by niyax; 03-16-2004 at 10:37 AM.

  • #2
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh boy that's a tough one.

    It is definately possible, using DOM. However it will take a very long time to come up with a clean solution.

    You'd also have to ensure that the structure is ALWAYS the same in each cell, since that's all you can rely upon as your data are not in separate cells.

    I can't help you anymore than that I'm afraid. Perhaps someone on here hasn't got a life and can be of more assistance.

    I might want to add that you could use a server-side language to implement this, perhaps a little more easily... especially if your inventory changes regularily and you want to keep your data in a database... just a thought.

    Good luck,
    Sadiq.

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    www.the-hive.dk/~donp/t.html

    remember don't remove the header in the js file.

  • #4
    Senior Coder
    Join Date
    Feb 2004
    Posts
    1,206
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Perhaps someone on here hasn't got a life and can be of more assistance.
    No offence Garadon, lol! Good job though, nice one!

    Sadiq.

  • #5
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Non taken I know I ain't got a life. I am AI


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •