Popup loads and shows but js code won't run?

I created a popup that loads my product data, in the popup template I want to run code. The js won’t run… any idea how to do this properly?