Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    hi there,

    Was hoping someone could help me get to the bottom of quite a strange issue I'm having with a Javascript scroll.

    It can be found here

    http://www.ddvdesigns.com/fullham.html

    It works fine in Safari, however in Chrome not so good, here it will scroll through once but then when you keep clicking it missed out half the picture leaving me with a blank screen on a number of the screens.

    Can't see any reason why this would be happening and was hoping that someone might be able to help?

    Thanks!
    John

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    I don't think it has anything to do with javascript per se, but I may be wrong, I'm thinking this is more of an effect of the difference between browsers and how they cache and display previously viewed images...

    make sure to define your image paths as "absolute" in all of your scripts... so no matter if the browser has displayed the image previously, it doesn't have to "interpret" what you meant... but has explicit instructions on what to do...then if the browser has already "cached a copy" of the image... it doesn't have to reload it...it just pulls it from your temp files

  4. #3
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    There are a few things I can see that could be causing this, all of which are coding errors:

    1) You have a closing </div> tag that was never opened. (Not likely, but it might solve another issue which I'll get to).

    2) You're not preloading your images. If you're going to use a script like this and you don't preload your images, you'll see slowdowns, awkward navigation, and possibly white screens.

    You'll want the array example from this page, since you've already got an array defined (which is a good thing).

    3) imgcnt is equal to 0, when it should be equal to the count of your images. Not sure why it's 0 or if it gets assigned somewhere other than the Javascript, but it should be 10 in this case.

    As far as the closing div tag goes, you may want to remove it so that your page looks the way you want it to in IE. Right now, everything's off to the left. The other thing you'll probably want to try is text-align: center; on the container. But have a look at your page in IE, because it's not doing what you probably want it to do (although in this case, it's not doing what you want because you've got code issues).
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  5. #4
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    Hey guys,

    Thanks very much for getting back to me on this one.
    I've looked at the </div> issue and the image count, looks to have sorted out the problems and am able to scroll right through all images through again. Thanks!
    See what you mean about this ie issue with alignment (hadn't started my full browser check yet) seems like a bit of a problem.
    I added in the text align in the wrapper but this has a knock on effect on my content in that it should actually be aligned left to to the left of the container (if that makes sense).
    The problem appears to be that in ie sites content (which is defined as 800px) is aligning to the left hand of the page whilst in every other browser it is centred.
    Do you know why this would be? had a look over the code and can't see a reason for it, annoying!
    Thanks again for your ongoing support.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:27 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com