Reputation: 575
I tried to hook my link to a <tr>
and made some like this:
<tr onlick=document.location.href='something.html'>
I do find it working but the thing is.. I want to make the link in a popup window and have this function..
function popit(url){
newwindow = window.open(url, '', "status=yes, height=500; width=500; resizeable=no");
}
It's quite working fine when I applied it to some of my <a>
but the thing is I cant use popit(url)
function and at the same time use onclick
attribute to a <tr>
.
Upvotes: 0
Views: 3634
Reputation: 707158
You should just be able to specify:
<tr onclick="popit('something.html')">
As long as the popit()
function is a properly defined global function elsewhere in your javascript.
You can see it work here: http://jsfiddle.net/jfriend00/5rWep/
Upvotes: 2