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 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    41
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Form submition, new window (popup)

    Hey,
    I have a few problems I'm trying to solve.

    what I have is page with a form, containing some check-boxes (to compare items),
    and three possible actions:
    1. View selected items
    2. Print selected items
    3. Compare selected items
    I want the new form to
    1. Open in new window (preferably with no status bar, command buttons etc')
    2. be compatible for older browsers and no-javascript support
    The problems I'm having are that after opening a new window (myWindow=window.open(..)),
    if I change my forms' target t myWindow, and try to submit my form (via JS, i.e. myForm.submit()) IE7 blocks it as a popup although my window is already open.

    another problem is if I set my forms' target (in raw HTML, no JS) to "_blank", the form is not submitted, and I'm getting only the current URL again in the new window.

    Any ideas how I can perform one of the three actions with the requirements I have? I'm pretty stuck on this one...

    Thanks

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by Eli. View Post
    another problem is if I set my forms' target (in raw HTML, no JS) to "_blank", the form is not submitted, and I'm getting only the current URL again in the new window.
    I'm not sure why you say that the form is not submitted. There shouldn't be any problem with this approach to my knowledge.

    PHP Example. Self-submitting form. When user submits the form a new page opens in a new window.

    index.php
    PHP Code:
    <?php
        
    /* PHP statements, form handling */
    ?>
    <form action="" method="post" target="_blank">
        <div>
            <input name="Submit" type="submit">
        </div>
    </form>


  •  

    Posting Permissions

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