Open Domods opened 7 years ago
@Domods , Did u find any solution to this?
@iampapagray not yet unfortunately
You can set the url in plain text and add a class on the td element
echo '<td><a href="?key='.$_GET['key'].'&link='.$row['Link'].'">'.$row['Link'].'</a></td>';
becomes
echo '<td class="linkurl">'.$row['Link'].'</td>';
then using an event handler (onDraw), you can dynamicaly wrap each td's content with an <a>
element with the href that you want
$('.linkurl').each(function(){ var value = $(this).text(); $(this).html('<a href="?key='+urlParam+'&link='+value+'">' + value + '</a>'); });
To grab the url parameter (urlParam) with javascript you can use this method
var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = window.location.search.substring(1), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParameterName = sURLVariables[i].split('='); if (sParameterName[0] === sParam) { return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]); } } };
and use it as
var urlParam= getUrlParameter('key');
I hope this works if anybody needs it :)
@mikapa21 can you please explain it more clearly ...I'm a newbie and tried your suggestion but it didn't work ...maybe i didn't apply it well
I am trying to make a clickable link in a Tabledit cell, but cannot get it to work. It seems to be sanitized or something.
The code works in a standard formatted table, but not with Tabledit.
How can I make this work?
Simple version:
<td><a>Cell text</a></td>
In my Code: