I'm not sure of your current skill level, so I'm making some assumptions based on what you said. Assuming that you know how to craft a SQL query to select data about a specific product (a specific product ID), and assuming you know how to use PHP to execute that query and how to retrieve the data into PHP variables, then.....
Your javascript is ALMOST there.
<script language="javascript">
function ProductDetail(id) {
url = 'longprod.php?id='+id;
window.open(url,'welcome','width=400,height=400');
}
</script>
<a href="javascript:ProductDetail(<?= $ID ?>)"><?= $name ?></a> I hope that fills in the gaps for you! Enjoy the journey.
Free Delivery on all orders