iBox Overlay Doesn’t Scroll

Hello, Google searcher!  I spent 2 hours so you don’t have to!

Search for the following line of code: 

els.overlay.style.height = height + ‘px’;

Now add this after it.  Problem solved!

      //causes the overlay to scroll as the page scrolls — necessary for Safari/Chrome/FF3

      if (document.viewport && document.viewport.getScrollOffsets()) {

        var top = document.viewport.getScrollOffsets()[1];

        els.overlay.style.top = top + “px”;

      }

OK, back to regular readers of this blog: as mentioned previously, I’m testing a new shopping cart.  There were previously 3 known issues:

  1. the overlay didn’t scroll
  2. the price got all funky in Google Checkout under some conditions
  3. the quantity and price were inconsistent if you switched the item after closing the cart

I’m happy to report:

  1. I patched iBox to avoid this issue, and tested it in five browsers because I just have no life whatsoever.  Please see above code if you need it.
  2. e-junkie continued their years-long practice of above-and-beyond support and corrected my misunderstanding of their API, which let me patch my code around this
  3. I patched my code, in a ho-hum workmanlike fashion.

The more I use Javascript the more I feel that a) all websites I’ve ever used are missing massive opportunities to make their user interaction sexier than they can possibly imagine and b) I can understand why, because coding Javascript is the most painful programming I’ve done since C in college.  

Oh, God, the cross-browser issues!  The sheer complexity of the DOM model!  The paucity of good documentation available in my IDE next to autocomplete!  (Sorry, I will always be a Java programmer at heart.)

Anyhow, if you want to take a gander at the current version of the sample cart or compare it to the current cart, go nuts.  After I alter it a bit tomorrow to make the error handling sexier (i.e. for the disallowed multiple purchase through Google — it has never happened before but, eh, why not ship it right the first time), I am going to start the split test.

Advertisements
Explore posts in the same categories: Uncategorized

5 Comments on “iBox Overlay Doesn’t Scroll”

  1. MB Says:

    Patrick, I have one simple suggestion for you: learn GWT!

  2. Patrick Says:

    I might do that… someday 😉

  3. Sohail Says:

    Sort of in line with the GWT recommendation, I really like Parenscript for writing JavaScript. I’ve used it for a couple of projects and nothing is more malleable. GWT does more than Parenscript for sure, but nothing beats writing JavaScript in Parenscript.

  4. Barry Hess Says:

    I’ve been quite happy with both Prototype and jQuery. Though I mostly use Prototype. It takes getting used to, and I even surprised myself by typing in the “curry” method without reading the doc the other day. 🙂

  5. Andrew Says:

    I second the GWT recommendation. I hate writing javascript but have really enjoyed developing even complex AJAX apps in GWT.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: