aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Moving tr in a table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Moving tr in a table" Watch "Moving tr in a table" New topic
Author

Moving tr in a table

ms raaghu
Ranch Hand

Joined: Jul 10, 2009
Posts: 66
Hi,

I have a problem in moving the tr's up and down on clicking on the arrows on the side. my table structure is as below:

<table cellspacing="0" cellpadding="0" class="srTable">
<tbody id="SrvAddrs">
<tr>
<td>
</td>
</tr>
</tbody>
</table>

Could anyone please help me out in doing this in jquery or javascript.

Thanks,
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
What did you try?
ms raaghu
Ranch Hand

Joined: Jul 10, 2009
Posts: 66
I tried doing it by re submit the page but now the requirement is do without submitting. Could you please help me doing?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Do you know how to select a row with jQuery? Do you know how to call clone()? Do you know remove()? Do you know about insertBefore()? Do you know how to add click events?

Eric
ms raaghu
Ranch Hand

Joined: Jul 10, 2009
Posts: 66
no, am very new to jquery.. could you please help me out in this

-Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Give it your best shot and post your code. We'll help you with your code but will not write it for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ms raaghu
Ranch Hand

Joined: Jul 10, 2009
Posts: 66
Okies .. actually this is what i have written
 
wood burning stoves
 
subject: Moving tr in a table