I don't think I explained myself very well - apologies.
I have the first page collecting information from the user, when they hit the submit button, a seperate page checks the information and highlights any errors - this is the page I am trying to place the popup on.
What I want to do is, when an error is found and a popup is displayed, upon clicking the OK button, the user is sent back to the first page to re-enter the information that they either missed out or was incorrect.
I have tried placing the code in the first page, but it will obviously bring the error messages up every time the page loads.
Can anyone help or am I just confusing you all?