Javascript problem

I'm running a JavaScript on my site that's working like a mouse-over. when the mouse is moved on it (links, in my case) the image changes to another. Everyone else seems to see it correctly... but it takes some while until it opens on my computer. Does anyibe has any advice to get it working on my computer? Thank you.
1 answer Last reply
More about javascript problem
  1. i'm not really sure about the question but here's my try. there's something called preloading images, which is caching the image in the web browser's cache before the graphic is actually called onmouseover. here's the code from macromedia dreamweaver...

    <script language="JavaScript">
    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}

    <body bgcolor="#FFFFFF" text="#000000" onLoad="MM_preloadImages('a','b')">

    where a and b in the <body> tag are the graphics you want to preload. note that the above has to make spaces because this forums interprets it as italics... remove the spaces.


    <<I Come And Go All The Time>><P ID="edit"><FONT SIZE=-1><EM>Edited by machow on 11/09/01 10:16 AM.</EM></FONT></P>
Ask a new question

Read More

Mice Javascript Computers Apps