iwato Posted August 31, 2019 Share Posted August 31, 2019 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? Roddy Link to comment Share on other sites More sharing options...
justsomeguy Posted September 3, 2019 Share Posted September 3, 2019 What code are you running on the page that scrolls? The answer is in there somewhere. Link to comment Share on other sites More sharing options...
iwato Posted September 12, 2019 Author Share Posted September 12, 2019 I have scoured the relevant page -- namely, overview.html -- and can find no difference. I am at a complete loss. Roddy Link to comment Share on other sites More sharing options...
justsomeguy Posted September 12, 2019 Share Posted September 12, 2019 Every time you click search, you add a CSS file to the head. Get rid of that and see if it changes. Link to comment Share on other sites More sharing options...
iwato Posted September 14, 2019 Author Share Posted September 14, 2019 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. Roddy Link to comment Share on other sites More sharing options...
Funce Posted September 15, 2019 Share Posted September 15, 2019 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: null 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now