nemiroff Posted March 13, 2007 Posted March 13, 2007 Dear all, I believe the answer of following question will help to avoid many double orders and confusions for earning time & money. is there someone who knows how to prevent double click on checkout_confirmation page button ? I found there is code like below, echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n"; ?> I found also below will avoid double clicks after the first one, <input type="submit" onClick="this.disabled=true"> but I don't know how to mix those codes for strange writing of oscommerce. Any help will be appreciated.
davidinottawa Posted March 14, 2007 Posted March 14, 2007 echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n"; ?> <input type="submit" onClick="this.disabled=true"> but I don't know how to mix those codes for strange writing of oscommerce. Well - the function looks like this : tep_image_submit($image, $alt = '', $parameters = '') So try this : echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER,'onClick="this.disabled=true"') . '</form>' . "\n"; but - not sure that you can disable an image This javascript is likely meant for a html submit button david
nemiroff Posted March 15, 2007 Author Posted March 15, 2007 Well - the function looks like this :tep_image_submit($image, $alt = '', $parameters = '') So try this : echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER,'onClick="this.disabled=true"') . '</form>' . "\n"; but - not sure that you can disable an image This javascript is likely meant for a html submit button david thanks for the reply, it works.. YES, but not after one click, it cannot be clickable. always.. do you have an idea how can I avoid double clicks on credit card authorization ? there is 3-5 seconds waiting time
davidinottawa Posted March 15, 2007 Posted March 15, 2007 thanks for the reply, it works.. YES, but not after one click, it cannot be clickable. always.. do you have an idea how can I avoid double clicks on credit card authorization ? there is 3-5 seconds waiting time Well - at the very least put in a bold text message that says "Please be patient and only click submit once" or - why don't you just change the submit button from an image to text, then use the Javascript you found. david
nemiroff Posted March 16, 2007 Author Posted March 16, 2007 Well - at the very least put in a bold text message that says "Please be patient and only click submit once" or - why don't you just change the submit button from an image to text, then use the Javascript you found. david thanks for the nice idea, it leads me to think another way. I tried, but nothing happened. Instead of putting theme's button or a link, I though below should work ?> <input type="submit" onClick="this.disabled=true"> </form> <br> <? it is an ordinary submit button, but how can I forward the necessary address ? where should it be written ?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.