PDA

View Full Version : bArTje.biz, mouseover


Deguram
06-03-2002, 01:35 PM
http://www.bartje.biz
I put it in one page page now and it's working a littlebit. First problem is that the script doesn't pick my buttons at once, but it begins to work after you moved you're mouse over the buttons. And another very strange thing happens. When you hit the first button, the one on the left, you get a default image, in the bottom of the page. Watch the site you will see what I mean. Can you please check what's wrong with the script.

Thank you very much by the way for your help so far.

(I put it in one page now, is there a script for image swapping in two different frames, please let me know if it's possible.)

Greetings
Dave
http://www.bartje.biz

fevertje
06-03-2002, 02:20 PM
Preloading the images might do the trick (not sure though). You can do that this way:

<head>
<script language="JavaScript" type="text/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[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('pic1.gif','pic2.gif')">

Just put the filenames in the body onLoad event.

Dr. Web
06-03-2002, 02:33 PM
well, is the javascript-your referencing the pic in pics/whatever.gif, but in the image tage you just call whatever.gif. This is why they aren't showing initially.... change the image tags to the correct path to the image, and problem # 1 is solved.

EX:
change
<img SRC="Flauwekrul.gif" NAME="a" ALT="Button 1" BORDER=0 height=45 width=90>

to
<img SRC="pics/Flauwekrul.gif" NAME="a" ALT="Button 1" BORDER=0 height=45 width=90>



problem number 2, the image BartjeFlauwekrul.gif is not at the location of http://www.bartje.biz/pics/BartjeFlauwekrul.gif where it should be, and so it shows broken when you try to use it in the swap. Make sure that you have uploaded the file, that it is in the correct directory (pics) and that is is named correctly.

Deguram
06-04-2002, 04:49 AM
I changed the images source, and that works. The only problem is the first button, top-left. It's strange when I view my site on my computer in a HTML editor or something, the script works. The strange thing is when I upload the site, it doesn't work anymore. I checked several times, I downloaded the site and then it works. It's a mystery to me.

Can somebody help me please, I tried everything I can.

Greetings
Dave

cpradio
06-04-2002, 06:51 AM
I show as this gif not being uploaded:
http://www.bartje.biz/pics/BartjeFlauwekrul.gif

Dr. Web
06-04-2002, 12:28 PM
Listen,

you don't need to open a new thread for new questions on the same topic. I already ansered this question in your original thread. I'll merge the two now.

Deguram
06-04-2002, 03:55 PM
I'm sorry that I messed up the forum a little with new topics (I think I wasn't thinking straight), nevertheless I would like to thank the people that helped me to solve my problems that I had with script. I learned a lot more and it's working now.

Respect to you and HtMlFoRuMs in particular...

Greetings
Dave