I have two tables, one being a master and one being a child table for a database. There is a link in every row on the 6th column in the master table that refreshes the detail table with data for that row. The current row is highlighted. I have a button on the detail table that searches through each TR of the master table for a particular value in the first TD which holds the row number, and if the value equals the current row number + 1, the following code is executed:
$("tr").each(function() {
var nextRownum = $(this).find("td[headers='COL01']").text();
if (parseInt(nextRownum) == parseInt(currentRownum) + 1) {
$(this).find("td[headers='COL06']").find('a').click();
}
});
$(this) being the TR. I know that this works somewhat, because I have the following code executing on page load…
$("td[headers='COL06']").find('a').each(function(){
$(this).click(function(){HighLight(this);});
});
…and when I click the button, the next row gets highlighted, but the page does not refresh; i.e., the hyperlink in my 6th column isn’t being activated.
Any suggestions? Thank you; Matthew Moisen
There is no
.clickby default on an anchor. You could do thisor you could give selected anchors a click event so that you can trigger them