Forum Moderators: open
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.
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.
<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)
Image4.src="http://www.villa.mysitespace.com/morepics2.jpeg"
Image5=new Image(133,31)
Image5.src="http://www.villa.mysitespace.com/moraira3.jpeg"
Image6=new Image(133,31)
Image6.src="http://www.villa.mysitespace.com/moraira2.jpeg"
Image7=new Image (133,31)
Image7.src="http://www.villa.mysitespace.com/more.jpeg"
Image8=new Image(133,31)
Image8.src="http://www.villa.mysitespace.com/info2.jpeg"
-->
</SCRIPT>
<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");
}
}
// -->
</SCRIPT>