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
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    Earth
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pop - up window with a form submit

    I wanted that when a person clicks 'submit', a window pops up that says, 'this file is uploading, please wait', then when they reach the previews page, the window either closes, or the window shows a new window that says 'file is complete'.


    Can anyone help me write this code.

    this is the original

    PHP Code:
            <?php echo tep_draw_hidden_field('products_date_added',
     ((
    $pInfo->products_date_added) ? $pInfo->products_date_added date('Y-m-d'))) . 
    tep_image_submit('button_preview.gif'IMAGE_PREVIEW) . '&nbsp;&nbsp;
    <a href="' 
    tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID=' .
     
    $HTTP_GET_VARS['pID']) . '">' tep_image_button('button_cancel.gif'IMAGE_CANCEL) . '</a>'?>
    this is what i've changed it to

    PHP Code:
    <?php echo tep_draw_hidden_field('products_date_added'
    ((
    $pInfo->products_date_added) ? $pInfo->products_date_added date('Y-m-d'))) . 
    '<a href="upload.php" onclick="NewWindow(\'upload.php\',\'file_up\',\'366\',\'253\',\'no\',\'center\');return false" onfocus="this.blur()">' 
    tep_image_submit('button_preview.gif'IMAGE_PREVIEW) . '</a>&nbsp;&nbsp;
    <a href="' 
    tep_href_link(FILENAME_CATEGORIES'cPath=' $cPath '&pID=' $HTTP_GET_VARS['pID']) . '">' 
    tep_image_button('button_cancel.gif'IMAGE_CANCEL) . '</a>'?>

    of course it does not work. all it does is show the pop-up, but it doesn't submit the form. now if the link doesn't work, then the form submits, so how do i make it work?
    Last edited by Trusten; 02-18-2003 at 03:15 PM.
    Life is funny, especially when you're poor.

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,106
    Thanks
    11
    Thanked 101 Times in 99 Posts
    impossible to say without seeing the output of your form element functions... at which time it will really be a HTML/JavaScript question.. but post some output anyway for us to have a looksee.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Earth
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if you can write me an exampel for a regular form, i can change it to fit this code
    Life is funny, especially when you're poor.


  •  

    Posting Permissions

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