PHP Code:
<a href="showthread.php?$session[sessionurl]do=testaction&t=$threadid" target="threadpop" onclick="window.open(this.href,this.target,width=400,height=400); return false;">Execute Test Action</a>
Then you just adjust your width and height statement to match the contents of the popup, and it will degrade nicely if your users have javascript turned off...
You can also add other options after the width, height statements but still in the parenthesis to specifry which options you wanna turn on (status, resize, etc) - thje exact wording for these you can find on w3schools.com (I always rtfm, rather than using up precious memory space in my head with the exact wordings...)