Jump to content

Automated Scrolling -- Suspected Bubbling


Recommended Posts

BACKGROUND:  I have, somewhat miserably, copied code from one document to another and changed a word in multiple locations in the copied code in an effort to adapt to a different environment.  Unfortunately, the result of the copied code is not identical with the result of the code that was copied. Now, there are obvious places to look for the discrepancy, and this I have surely done.  Still, I can not find the source of the discrepancy.

In an effort to duplicate my frustration, please follow the steps below:

STEP ONE:  Open to the Grammar Captive mainpage.

STEP TWO:  Find the navigation bar on your left and the menu item named Local Search.

STEP THREE:  Click on the word Newsletter.

STEP FOUR:  Enter into the appropriate box the number of the word-number phrase and click on the SEARCH button.  DO NOT enter a keyword!

STEP FIVE:  Watch how the main content scrolls to the bottom of the respective div.

STEP SIX:  Repeat STEPS ONE thru FOUR, but in STEP THREE, click on the word Podcast.

STEP SEVEN:  Notice the absence of scrolling.  This is the preferred behavior.

QUESTION:  What is causing the div to scroll in the one case, but not the other?


Link to comment
Share on other sites

  • 2 weeks later...

I can do as you suggest, but have no idea why it would change anything.  The Custom Search functionality for Newsletter, Podcast, and Q&A is, with the exception of several variable names and values, identical.  What changes is only the content that is uploaded only after a match has been made.  The problem occurs before any match is made occurs on only to of the three search engines.


Link to comment
Share on other sites

Hey Roddy,

I had a look through and it seems you get a jquery error on the ones that don't scroll.

The error given is below

jquery.js:358 Uncaught TypeError: Cannot read property 'length' of null

What I found is that you're using jquery.each on some JSON data you receive from search_podcast.php

However the only thing I can see I've received from search_podcast.php is:


Compare this with the result from search_letter.php


And you can probably tell you've got some malformed JSON being returned. I would check the difference between search_podcast and search_letter in their return values.


On a side note, gc_splash.css is requested 114 times. Although at 8.6KB each, and 150ms response time, that's pretty hefty for 114 instances. You should only need to include this once for a given webpage.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...