You DO know that you cannot call a PHP function from javascript right? So in this case printValue is a javascript function I assume?
And i assume you are going to have the php print out the javascript code for printValue()?
And also, in your javascript printValue function, make sure you don't call a return; because otherwise the browser will try to load it as a URL or print the value to a blank page :-)
You can always make it refresh to a new page to display the details:
print "<a href=\"details.php?name=" . $col_value . "\">" . $col_value . "</a>";
-sridhar