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) . '
<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>
<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?
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) . '
<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>
<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?