Javascript confirmation box

Hi, I have read a couple of tutorials on how to make javascript popup boxes to confirm an action, but I havent managed to make it work with php. What I need is a sort of pause and when you click ok on the box, then it should continue reading the php code. Is this possible or shall I write the continuing on another page?

Thanks a lot in advance
bunky.