Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: PHP Popup

  1. #1
    Regular Coder anarchy3200's Avatar
    Join Date
    Mar 2003
    Location
    England
    Posts
    261
    Thanks
    0
    Thanked 1 Time in 1 Post

    PHP Popup

    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.

    Mike

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    De gustibus non est disputandum.

  • #3
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •