homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Java Script question
Why are my mouseovers so slow?

10+ Year Member

Msg#: 782 posted 9:20 pm on Feb 6, 2003 (gmt 0)

I have just set up a small site (my first!) and place in four buttons in Java script. These change on mouse over.

The buttons work fine on my computer but since uploading them to the web they are soooo slow. (site is in profile)

Why is this? what determines how fast and smooth things like this and drop down menus are? is Java not the best thing to do this in?

I'm starting my second site and want some very slick menus whats the best way to acheive this.



WebmasterWorld Senior Member txbakers us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 782 posted 9:53 pm on Feb 6, 2003 (gmt 0)

Hi. First off, JAVA is not JAVASCRIPT. They are two different languages.

The javascript rollovers could be slow on the web for a number of reasons, the most obvious at first glance would be that the "under" images need to be physically downloaded when the user puts their mouse on the "over" image.

You can speed this along by "preloading" the hidden images. There is plenty of code out there to do this. It's just one javascript method.

As for slick navigations systems, there many good DHTML scripts available which can make navigation systems. Keep in mind that after the first time a user sees something slick it's not a novelty anymore. Your first goal should be useability.


10+ Year Member

Msg#: 782 posted 11:06 am on Feb 7, 2003 (gmt 0)

Have been trying to Preload my images all morning but nt really getting anywhere! My Script is below where am I going wrong?

<SCRIPT language=Javascript>

Image1=new Image(133,31)
Image1.src= "http://www.villa.mysitespace.com/charge3.jpeg"
Image2 =new image(133,31)
Image2.src= "http://www.villa.mysitespace.com/charges2.jpeg"
Image3=new Image(133,31)
Image3.src= "http://www.villa.mysitespace.com/morepics1.jpeg"
Image4=new Image(133,31)
Image5=new Image(133,31)
Image6=new Image(133,31)
Image7=new Image (133,31)
Image8=new Image(133,31)
<SCRIPT language=Javascript>
if (document.images) {
aaon = new Image(); aaon.src = "charges3.jpeg";
aaoff = new Image(); aaoff.src = "charges2.jpeg";
abon = new Image(); abon.src = "morepics1.jpeg";
aboff = new Image(); aboff.src = "morepics2.jpeg";
acon = new Image(); acon.src = "moraira3.jpeg";
acoff = new Image(); acoff.src = "moraira2.jpeg";
adon = new Image(); adon.src = "more.jpeg";
adoff = new Image(); adoff.src = "info2.jpeg";


function imgOn(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "on.src");

function imgOff(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "off.src");

// -->


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved