Thread: pop-up windows

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Canada
    Posts
    35
    Rep Power
    14
    Hi guys,
    I have a form coded as:
    <form action="test.php" method="post">
    the form has two buttons: Preview and Submit

    test.php:
    if ($Preview) {// perform action 1}
    else {// perform action2}

    My question: If Preview is clicked, I would like to open a new pop-up window without closing the original one. I would like the results of action 1 to be displayed on this new pop-up window.
    Is there a way to do that without using javascript?
    If no, then how would you do that with javascript???

    NB: i cannot use target=_blank in the form tag because i would like to have the pop-up window only if Preview is selected.
    But maybe there is a better way to code everything!

    thanks in advance!

  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    Herne Bay, Kent, UK
    Posts
    30
    Rep Power
    14
    Wouldn't you have to use Javascript and the onSubmit event? When the button is pressed, use javascript to open the window to your specifications, but format the url for the window using javascript to include the variables you're posting. something like document.formname.elementname.value I think...

Similar Threads

  1. URL with bookmark on close spawns multiple pop up windows
    By Lalita in forum Beginner Programming
    Replies: 4
    Last Post: February 3rd, 2004, 10:11 PM
  2. Replies: 2
    Last Post: January 30th, 2004, 12:02 AM
  3. unique size pop up windows
    By plastic_chai in forum HTML Programming
    Replies: 12
    Last Post: January 13th, 2004, 08:29 PM
  4. pop up windows
    By dakillerspyder in forum HTML Programming
    Replies: 2
    Last Post: November 17th, 2003, 02:20 AM
  5. samba 2.2 shares "taking over" windows shares
    By nspeed in forum Networking Help
    Replies: 0
    Last Post: October 28th, 2003, 04:21 PM

IMN logo majestic logo threadwatch logo seochat tools logo