Ok sorry was a bit late when i wrote that,
I have a asp gridview control populated by a sql stored procedure. then i have added a hyperlink button to the gridview control and have set the datanavigateurlfields to the field i want to transfer to the next page, i have also set the datanavigateurlformat and the link works i just wanted it to be in a popup window.
I have a javascript function which can create a popup window but i cant see how to call it from the onclick of the gridview hyperlink.
I have also created a variable which stored the data i want in a variable when the item is clicked.