View Full Version : PHP Popup

05-20-2004, 10:50 PM
is it possible to create a php popup window with a set size etc like a javascript one?

what i am trying to do it take a form then post the values that the user entered in the popup.

is it possible to do without using an onsubmit in the form tag?

Thanks for any help.


05-20-2004, 11:24 PM
No, that's not possible in PHP, because it runs on the server and hasn't go the slightest idea what a popup window would be. If you don't want to rely on JavaScript, which would be the appropriate language for this task, you can put a target="windowName" attribute in the <form> tag, and the result will be opened in a new window. You can't control the dimensions of the newly opened window though.

05-21-2004, 10:18 AM
Like mordred said : can not b done with PHP.
If you don't wan't to rely on javascript, then you also have no means for closing the window again (which is a big problem in my opinion because that window keeps the session alive and can leak your sessionID). So my position on this is to only open a new window if i realy can't avoid it, and only using javascript so that i can close it a few clicks later.

If it needs to be completely universal, then i either not use popups at all, or i simulate a popup-like thing with a div that i place above the other content.