Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update by row count within a table sort

Status
Not open for further replies.

graziaR

Programmer
Jul 28, 2006
14
US

Hi,


I have an HTML table and within its body, I create display though a while loop the results of a search.
Then for each row of the displayed results, a javascript submit changes to a java servlet when I click on that particular row.

Now, everything goes well as long as I do not sort by column the table on my web page.
I guess, the index of the row I am trying to change is submitted correctly to the javascript.
But if I do sort the table, the javascript does not get the correct row index, and no changes to the data can be submitted.
Is anyone knowledgeable about the interaction between javascripts and HTML tables of type tablesort ?
How could I make sure that upon sorting the table of results (by whatever column values) I still can get the javascript to work properly on the row I select ?

Many thanks in advance,

Grazia
 
May I ask you to give me an example or to help me find one somewhere online ?

G.
 
I found an easy solution.

One has to make sure that the <form> is defined within the <tr>s
This way:

<tr>
<form ....>
.....
<td>
.....
</td>
<td>
....
</td>
</form>
</tr>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top