• Resolved fgjfkfffa1

    (@fgjfkfffa1)


    hi tobias,

    i have urls in tablepress cells. on click I need them to open in an externally created iframe located on my site above the table.

    using basic solution you proposed i can get new window. am having trouble integrating with iframe however as it simply grabs the href and so prevents an html a target=”iframe1″ solution.

    code currently
    <script type=”text/javascript”>
    jQuery(document).ready(function($){
    $(‘.tablepress’).on( ‘click’, ‘tr’, function() {
    var $a = $(this).find(‘a’).last();
    if ( $a.length )
    window.open($a.attr(‘href’));
    } );
    });
    </script>

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    I’m afraid that this is probably not possible directly like this. (Or, if it is, my JS knowledge is no sufficient to know a solution.)
    I would suggest not using JS here, but only the link with the target attribute.

    Regards,
    Tobias

    Thread Starter fgjfkfffa1

    (@fgjfkfffa1)

    Understood. I was trying for js as that was the original solution you proposed for clickable rows based off a hidden last cell url. Do you know of a non-js way to accomplish the same thing as the code I’m using right for the table?

    As always thanks for your time and hard work on this project.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no, sorry, I’m not aware of a non-JS code that allows full-row clicks.

    Using JS might actually work though, it’s just the question of finding a way to set the iframe source from JS. Then, you could modify the code accordingly.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘clickable rows load to same page iframe?’ is closed to new replies.