popup hell - submit & close

Maybe this is the case. You click the submit button, it bring you to the new page. So the javascript does not work because you are already in new page. You should put window.close function in the new page (your missing template).

Instead of using a popup window, how about something a little more slick?

http://sublog.subimage.com/articles/category/submodal

It’s designed for such situations as yours :wink: