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 10 of 10
  1. #1
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    Hey,

    Been checking this for a couple of days now and was hoping to get some fresh eyes on it...

    I've put a Javascript to scroll images on a site i'm working on and it works fine in Sarafi however not in other browsers.

    The page is here:

    [COLOR=rgb(32, 117, 183)]http://www.ddvdesigns.com/fullham.html[/COLOR]

    And here is my Javascript...

    var imgs = new Array(); var imgcnt = 0; var thisimg = 0;
    imgs[imgcnt++] = 'images/fullhamscroll0.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll1.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll2.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll3.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll4.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll5.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll6.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll7.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll8.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll9.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll10.jpg';


    function nextImg() {
    if (document.images) {
    thisimg++;
    if (thisimg >= imgcnt) thisimg = 0;
    document.rollimg.src = imgs[thisimg];
    }
    }
    function prevImg() {
    if (document.images) {
    thisimg--;
    if (thisimg < 0) thisimg = imgcnt-1;
    document.rollimg.src = imgs[thisimg];
    }
    }

    I've also attached my CSS here
    http://www.webdesignforums.net/attac...vcss-txt.4141/

    Any help with will be greatly appreciated, I'm sure there's a really simple solution but I'm now blind to it!

    Thanks,
    John

  2.  

  3. #2
    Member
    Join Date
    May 2011
    Location
    Baltimore, MD
    Posts
    60
    Member #
    27796
    Liked
    11 times
    Chrome looks good.
    IE 9 looks good.
    FF 4 looks good.

    honestly, code looks fine. What browsers are not working for you?
    /phillihp/
    Check out my blog @ http://www.phillihp.com
    ~Web~Mobile~Hacking~Tech~Gadgets~More~

  4. #3
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    Very Bizarre, it is only effecting me in Chrome on one computer (the mac I built the site on)
    I cannot think of a single reason why this would happen...

    Thanks for the reassurance!

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Other than "you need a preloader", it's fine here too.

    Have you tried updating your version of Chrome on your Mac?
    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)

  6. #5
    Junior Member
    Join Date
    May 2011
    Location
    Austin, TX
    Posts
    6
    Member #
    27812
    Liked
    2 times
    I've found success with similar issues in Chrome by using a window.onload function. Try using the following and see if it helps:

    Code:
    <script type="text/javascript">
    window.onload = function(){
    var imgs = new Array(); var imgcnt = 0; var thisimg = 0;
    imgs[imgcnt++] = 'images/fullhamscroll0.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll1.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll2.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll3.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll4.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll5.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll6.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll7.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll8.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll9.jpg';
    imgs[imgcnt++] = 'images/fullhamscroll10.jpg';
    }
    
    function nextImg() {
    if (document.images) {
    thisimg++;
    if (thisimg >= imgcnt) thisimg = 0;
    document.rollimg.src = imgs[thisimg];
    }
    }
    function prevImg() {
    if (document.images) {
    thisimg--;
    if (thisimg < 0) thisimg = imgcnt-1;
    document.rollimg.src = imgs[thisimg];
    }
    }
    </script>

    Hope this helps :/

    Brandon

  7. #6
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Thanks for the help, Brandon. But I had to remove your signature. We don't allow them until users reach 25 posts, just to keep the spammers at bay.

    You're more than welcome to one, and we encourage you to use one, once you get to the 25-post mark...especially if you make 24 more posts like this one.
    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)

  8. #7
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    Thanks all!

  9. #8
    Junior Member
    Join Date
    May 2011
    Location
    Austin, TX
    Posts
    6
    Member #
    27812
    Liked
    2 times
    Did that work for you Jonny?

  10. #9
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Yeah, did it? That's a good question.
    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)

  11. #10
    Senior Member
    Join Date
    Jan 2011
    Posts
    148
    Member #
    26229
    Liked
    1 times
    Yes, sorry said thanks by way of confirming this.

    It was a really bizarre situation that was only effecting the one machine, so bizarre but yea all appears to be good now.


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:32 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com