• Why not take a moment to introduce yourself to our members?

Reefguide

Advanced Reefer
Rating - 0%
0   0   0
Since we are sharring.... See mine ! A bit graphic intensive !

BTW I love your design Chris... I love the mouse rollover with the images... Very cool !
 

ChrisIsBored

Experienced Reefer
Rating - 0%
0   0   0
Thanks Reefguide... you've got some nice looking pics up yourself! :D

Great thing about that mouseover, it's not a 2nd image, it's done by filters with javascript. Only works on IE though, so anyone else just see's the image how it is.

Add this to the header to your site
Code:
<SCRIPT language=javascript>
function gray_on(nr) {
}
function gray_off(nr) {
	this.filters.item(0).enabled=false
}
</SCRIPT>


Then a little modification to the image(change the preview# for each image)
Code:
<IMG id=preview4 onmouseover=preview4.filters.item(0).enabled=0       style="FILTER: gray(enabled=1)" onmouseout=preview4.filters.item(0).enabled=1 src="image.jpg">


:)
 

mongo

Reefer
Rating - 0%
0   0   0
If you use the following code it will work in netscape, IE, mozilla or whatever.

In your header, define the images and a function to swap them
<SCRIPT LANGUAGE="JavaScript1.1">
<!--
{
but0 = new Image();
but0.src = "image1.jpg";
but1 = new Image();
but1.src = "image2.jpg";
}

function changeImage(imgDocID,imgObjName) {
{
document.images[imgDocID].src = eval(imgObjName + ".src");
}
}
-->
</script>

Your HTML code will look like this:

<A HREF="http://www.whatever.com" onmouseover="changeImage('pic','but1')" onmouseout="changeImage('pic','but0')">link text to force change</A>

The image shown here is the one that gets swapped
<IMG BORDER="0" SRC="image1.jpg" ALT="" WIDTH="100" HEIGHT="129" NAME="pic">
 

ChrisIsBored

Experienced Reefer
Rating - 0%
0   0   0
That'll work too!
wink.gif


but the way I showed uses up less bandwidth and saves me time from having to create an extra image just to have a mouseover effect.
skeezy.gif


Since we're all showing off our websites... do you have one too mongo? :D
 

mongo

Reefer
Rating - 0%
0   0   0
You're right about the bandwidth... Doesn't everyone have DSL, cable or T1 :?: My website is at http://schaefer.siue.edu, nothing there yet for my tank (tank is only a few months old), just classes and research. The old page (info is outdated) that has the changing images is at http://schaefer.siue.edu/cv/, move the mouse over the various categories to see it in action. One advantage of the method I used is that you can swap multiple images into one spot (don't honestly know if your method does that, haven't had time to check it out). That would be cool if you had a list of your tank inhabitants and when you moused over a name the image appeared. Hmmm, maybe once I have a few spare moments I'll do that for my tank page!
 

Sponsor Reefs

We're a FREE website, and we exist because of hobbyists like YOU who help us run this community.

Click here to sponsor $10:


Top