This code in uc_cart.js breaks the checkout form page (testing in firefox) because the $('form#uc-cart-checkout-review-form input#edit-submit') object does not exist.

This code appears to not apply to the checkout form but to the review form?

After deleting this code, the checkout works normally.

$('form#uc-cart-checkout-review-form input#edit-submit').click(function() {
$(this).clone().insertAfter(this).attr('disabled', true).after('    ').end().hide();
$('#uc-cart-checkout-review-form #edit-back').attr('disabled', true);
});

Secondly, in I.E. on the checkout form, I am getting the js error 'getEelementById' is not an object. However I have not yet been able to figure out where this comes from. I upgraded drupal and jquery too so it might not be an ubercart issue. Because of the eval code in jquery it is very difficult to troubleshoot. Still looking into that.

thanks!

Comments

bob.hinrichs’s picture

After testing, I found the IE error is related. It also went away when the code was removed (and had to clear the cache!)

cha0s’s picture

StatusFileSize
new2.32 KB
new2.04 KB

Hey... those jQuery selectors are horrible, who could have written that code?!

So anyways, I ID'd the submit and back buttons in the checkout review form and in all the modules that hook into that form and modify the submit button to point at other sites. Hopefully that is enough to appease IE. Here are the patches for both versions:

cha0s’s picture

Version: 5.x-1.6 » 6.x-2.x-dev
Assigned: Unassigned » cha0s
Status: Active » Needs review
Island Usurper’s picture

Status: Needs review » Postponed (maintainer needs more info)

I don't know. I can't seem to find a way to keep IE from allowing me to checkout. If you upgraded jQuery, make sure you get the jquery_update module, which helps keep Drupal working smoothly.

The only weirdness that I noticed was that the shipping quotes won't update until you click away from the address panes. If this first click is on the "Review order" button, it doesn't submit, but the shipping quotes are refreshed. However, trying to submit the order again allows it to go through.

Hmm...I just realized that if you can't see the shipping pane on the same screen as the submit button, that's a really hard thing to notice. The only clue you get is the scrollbar suddenly getting bigger because there's less page to display.

Island Usurper’s picture

Title: Javascript errors disable the checkout page: incorrect object reference? » IE refreshes shipping quotes at the wrong time
Assigned: cha0s » Island Usurper
Status: Postponed (maintainer needs more info) » Active

So, this is now a usability bug, and a pretty big one, at that. I really wish that JavaScript had more standards than it does. Here's to hoping that supporting IE's quirks won't be as big a pain as it usually is.

Island Usurper’s picture

Status: Active » Fixed
StatusFileSize
new645 bytes
new980 bytes

I suspected this was a bug I'd encountered before. Apparently, in Internet Explorer Land, onChange doesn't happen when you change the value of an element, but when you stop paying attention to it after you've changed. Like IE wants to make sure you really want to change it before it bothers doing something about it.

So the solution is to change from the change event to the click event.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.