whyme 0 Report post Posted April 26, 2005 You can save your self the burden of having to see these problems by inserting a preloading code in html page.add this chunk of javascript to the <head</head> tags of your page: <script language="javascript"><!--var myimages=new Array()function preloadimages(){for (i=0;i<preloadimages.arguments.length;i++){myimages[i]=new Image()myimages[i].src=preloadimages.arguments[i]}}preloadimages("image1.jpg","image2.jpg","image3.jpg","image4.jpg");//--></script> replace image1.jpg to image4.jpg with the pictures that you are using, add more as prefered.and replace <body> with this:<body onload="preloadimages()"> by doing this, all your images will load before the site shows, so the on mouse over will automactically show up if you have a slow connection.hope this will help,-whyme Share this post Link to post Share on other sites
icemarle 0 Report post Posted April 26, 2005 Thanks! I'll need that! That's what I need! Even though I changed the image sizes, it's still slow. I'll use that code... I'll tell you what happens. THANKS! Share this post Link to post Share on other sites
whyme 0 Report post Posted April 26, 2005 gald i could help, tell me how things went.-whyme Share this post Link to post Share on other sites
Dooga 0 Report post Posted April 26, 2005 Here's an example I did with frontpage directly. As in, I made the page and uplaoded it FROM frontpage. Just make a new web. Frontpage will automatically upload the js file for you:http://forums.xisto.com/no_longer_exists/ Share this post Link to post Share on other sites
icemarle 0 Report post Posted April 26, 2005 Hold on whyme... I did it now, and well, I have to leave the cursor on the image for a while, and it still takes some time for it to change. (Despite making the image size/filesize smaller) Dooga, that's a cool site! *is mesmerized*The main problem is that it takes a long time for the swap image to show up. I wonder if I should leave a note for slower connections, or is there hope? Luckily I'm using Dial-up, so I can test it. Share this post Link to post Share on other sites
whyme 0 Report post Posted April 26, 2005 Hmm, ultimately, I can only say that apparenetly, your connection is so slow that it will still take some time for the javascript itself to function. The only solution left is to use CSS and render it the same way. I'll do this for you if you want, and you can test it on your 56k connectionpm me later,-whyme Share this post Link to post Share on other sites
icemarle 0 Report post Posted April 26, 2005 What's CSS? Thanks for the help again! It's so nice of you! Yeah, my connection's slow. But at least it could help me test the site if it's friendly for slower connections. A lot of people still use slow connections you know. Share this post Link to post Share on other sites
whyme 0 Report post Posted April 27, 2005 CSS is Cascading Style Sheets, it's another wat that you can do rollovers and create content layout without fumbling around with javascript. If you want to try out CSS, PM me, and i'll do it for you later this week, right now, I'm a bit busy with work.- whyme Share this post Link to post Share on other sites
icemarle 0 Report post Posted April 27, 2005 I see. I changed my script. It isn't DHTML anymore. It takes a second for the rollover to work in IE. (1 sec. of cursor over the image) But it doesn't work at all in Firefox. (For me) But it works in all browsers offline. Strange. I PMed you about this too. You haven't seemed to reply yet. I guess you're busy, but you should check out what I changed before you make scripts for me. Once again, Thank you for your time! Share this post Link to post Share on other sites
clagnol 0 Report post Posted April 27, 2005 Somebody beat me to the preload function But I did notice what seemed to be several identical javascripts in your code. I don't have time to pour over your code, but here is my appraisal of the situation.You know that script that handles the function that switches images? You only need that once. You can reference that function as many times as you want in the body of your page, but inserting the script in the head multiple times only serves to slow everything down.Presumably, you put that in your code once for each image. Classic n00b. I did the same thing before I learned a bit about Javascript.Of course, it's entirely possible that I overlooked something in my haste (finals week!). Share this post Link to post Share on other sites
icemarle 0 Report post Posted April 27, 2005 Yes, it's true. I did put several scripts of that for each image. I know nothing about Javascript, like I mentioned before, I'm afraid to tamper with it. So here I am waiting for someone to show me how to create a script that I can use for the entire page. (Or is it all I need? If I delete all but one of those head tag scripts, will it work?) Share this post Link to post Share on other sites