...

View Full Version : Pop - up window with a form submit



Trusten
02-18-2003, 02:12 PM
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 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 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?

firepages
02-19-2003, 01:36 AM
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.

Trusten
02-19-2003, 02:55 AM
if you can write me an exampel for a regular form, i can change it to fit this code



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum