0

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>.

Ian
  • 50,146
  • 13
  • 101
  • 111
Boy Karton
  • 565
  • 3
  • 9
  • 13

1 Answers1

2

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/

jfriend00
  • 683,504
  • 96
  • 985
  • 979