Help me please. There are 2 parameters in JSON: 1) name 2) link How to make the name (1) follow the link (2) when clicked
1 answer
As an option like this:
"<tr><td><a href='".$object['link']."'>".$object['title']."</a></td><td>".$object['link']."</td></tr>"; Well, if you need to get exactly from 2
"<tr><td onclick='window.location.href=document.getElementById(\"link\").innerHTML'>".$object['title']."</td><td id='link'>".$object['link']."</td></tr>"; |