1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Midlands, UK
    Rep Power

    preloading images?

    Please forgive me if this is the wrong forum for this question.

    I have 6 rollover buttons on my page. All are the same size.

    I used Dreamweaver to do them. They are just simple and turn a different colour when the mouse is over them.

    5 of them change instantly but the last one I added is slow. It seems to be loading the images from the web-server each time the mouse moves across the button.

    Dreamweaver added some java to my page. I presume this is to handle the rollover buttons.

    What could be wrong?
  2. #2
  3. Capt'n
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2001
    Rep Power
    Usually DW uses JavsScript to handle rollover, but then again I haven't used DW since Ultradev. Usually the first time the change over occurs will be a tad bit slower, but then the browser caches the images. I think there is way that it will tell the browser to do that automatically with the click of a check box somewhere in DW. But don't quote me on that.

    Another option you may wish to consider is using CSS and a:hover to highlight a text link on mouse over. It would be a faster load, but that just personal opinion speaking and I haven't seen the site. I recommend different things depending on the site and what "look" one is going for.
  4. #3
  5. Second highest poster :p
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2001
    Rep Power
    Dreamweaver still uses Javascript for the rollover images and normally puts in an image preloader into the onLoad section of the <body> tag. Make sure that all images used for the rollover are in that preloader command. But as kfickert said, once the image has been loaded once, all other views should be rather quick.

IMN logo majestic logo threadwatch logo seochat tools logo