What do you really mean?
If your php generates output with some javascript embedded, there's no difference for client, whether a page is generated or not: for him it's just some html and js. You need only to check if you really generate some valid javascript. Look in the resulting code for errors.
And in case you want your js validation to be executed on the server side, there's of course no chance to get anything: js is for client, not for server.