Click row to go to web address

Click row to go to web address

miltontmiltont Posts: 22Questions: 8Answers: 0
edited August 16 in Free community support

Hi,

I have the following script which used to work in DataTables, but for some reason it has stopped working.
Can anyone help me to get it to work again?

<script type="text/javascript">
            function clickyClick () {
            url = "https:/www.thehendonmob.com/search/?q=" + document.getElementById("user-input").value 
            window.open(url, '_blank');
            }
        </script>

This is one of the user-inputs that is used:

<tr    data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n=817885 ><td>Conrad Cassaniti</td>

Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide

Answers

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949

    How does this relate to Datatables. I don't see any Datatables code. Please provide a running test case showing the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • miltontmiltont Posts: 22Questions: 8Answers: 0

    Hi Kevin,

    attached is the code for datatables:

    ```<section id="table-section">
    <table id="myTable" class="display" style="width:100%">
    <thead id="table-head">
    <tr>
    <th class="header-color">Player</th>
    <th class="header-color">Played</th>
    <th class="header-color">Cashes</th>
    <th class="header-color">Wins</th>
    <th class="header-color">Heads-Up</th>
    <th class="header-color">Top 3</th>
    <th class="header-color">Final <br>Tables</th>
    <th class="header-color">Money<br>Bubbles<br>2021-24</th>
    <th class="header-color">$ Won</th>
    <th class="header-color">Cash per <br>Game %</th>
    <th class="header-color">Wins in <br> Money %</th>
    <th class="header-color">Final Tables <br>per Game %</th>
    <th class="header-color">Heads-Up <br> Wins %</th>
    </tr>
    </thead>

    <tbody>
    <tr data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n=560934 ><td>Rob Taylor</td><td id= "align">40</td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align"></td><td id= "align">2</td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align">0</td><td id= "align">5</td><td id= "align"></td>
    <tr data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n= ><td>Jeff Crosby</td><td id= "align">24</td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align">0</td><td id= "align">0</td><td id= "align"></td>
    <tr data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n= ><td>Cole Tee</td><td id= "align">22</td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align">0</td><td id= "align">0</td><td id= "align"></td>
    <tr data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n=673134 ><td>Scott Webster</td><td id= "align">16</td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align">0</td><td id= "align">0</td><td id= "align"></td>
    <tr data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n= ><td>Vinny Toleafoa</td><td id= "align">15</td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align">0</td><td id= "align">0</td><td id= "align"></td>
    <tr data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n= ><td>Blake Wilson</td><td id= "align">14</td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align">0</td><td id= "align">0</td><td id= "align"></td>
    <tr data-href=https://pokerdb.thehendonmob.com/player.php?a=r&n=199504 ><td>Paul Ward</td><td id= "align">14</td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align"></td><td id= "align"></td><td id= "align">0</td><td id= "align">0</td><td id= "align">0</td><td id= "align"></td>
    </tbody>

    </table>
    </section>```

    This is a small sample of the data for the table that holds approx 2,500 rows.

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949
    edited August 17

    I'm still not sure how that relates to Datatables as there is no datatables code. Please provide a test case replicating the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Start your test case here:
    https://live.datatables.net/

    This way we can see everything you have to help debug.

    Kevin

Sign In or Register to comment.