How to hyperlink a TD to local html page?

How to hyperlink a TD to local html page?

rajushettyrajushetty Posts: 3Questions: 2Answers: 0

Hi,

I'm using datatables with https://www.gyrocode.com/articles/jquery-datatables-alphabetical-search/ plugin.

Alphabet search wont work if we keep any html code between <td> </td>

I wanted to hyperlink every cell to a different html page,
So i added link like this.

<td>
<a href="demo.html" class="myclass" width="100%">demo </a>
</td>

When i alert the cell value it shows out everything (<a href="demo.html" class="myclass" width="100%">demo </a> ) between <td> </td>

How to fix please?

Answers

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    You could use a jQuery event. It would listen for the click event and then redirect the page.

    An alternative, which I would recommend, is that you update the alphabet search to strip out the HTML.

    Allan

This discussion has been closed.