Judy Doherty
02-14-2000, 09:27 PM
Hi
I know how to do basic mouseovers in Dreamweaver ie where upon "mouseover" a button changes.
But I would like to be able to do a mouse over where a message pops up somewhere else on the screen when the mouseover goes over a graphic or link.
Do any of you know the answer to this or where I can find it?
Thanks
------------------
foodandhealth.com
Try this page:
http://www.greengrouper.com/examples/onmouseover.htm
There are some variables in the source code - easy to configure. I think I got this a couple years ago from gamelan.com
Dan Kaplan
02-14-2000, 11:16 PM
Here's something that I think does what you want.[nbsp][nbsp]I orginally picked it up from an example at HTMLGoodies.com (free to use) and subsequently trimmed it down in size and looped a few things.[nbsp][nbsp]I think I've generalized this example down from the page it was being used on...[nbsp][nbsp]It will flip six images (more can be added easily), as well as a "main" image that you can place anywhere.
In the head section, place the javascript:
<SCRIPT LANGUAGE="JavaScript">
<!--
{
var alt=new Array();
for(h=1;h<3;h++) {
[nbsp]alt[h]=new Image();
[nbsp]alt[h].src="/images/main"+h+".gif";
}
var graphic=new Array();
for(i=1;i<7;i++) {
[nbsp]graphic[i]=new Image();
[nbsp]graphic[i].src=/images/but_"+i+".gif";
}
var graphicon=new Array();
for(j=1;j<7;j++) {
[nbsp]graphicon[j] = new Image();
[nbsp]graphicon[j].src = "/images/but_b"+j+".gif";
}
}
function imageChange(imageID,imageName,imageID2,imageName2) {
{
document.images[imageID].src = eval(imageName + ".src");
document.images[imageID2].src = eval(imageName2 + ".src");
}
}
// -->
</SCRIPT>
and then place something like this where ever you want in the body:
<table>
<tr><td width="122" valign="top" align="center">
[nbsp][nbsp][nbsp][nbsp][nbsp]<img src="/images/main1.gif" name="global" width="100" height="50" border="0">
</td></tr>
<tr><td width="122" valign="top" align="center">
[nbsp][nbsp][nbsp][nbsp][nbsp]<a href="page1.html" onMouseOver="imageChange('global','alt[2]','one','graphicon[1]')" onMouseOut="imageChange('global','alt[1]','one','graphic[1]')"><img src="/images/but_1.gif" width="98" height="23" name="one" border="0" alt=""></a>
</td></tr>
<tr><td valign="top" align="center">
[nbsp][nbsp][nbsp][nbsp][nbsp]<a href="page2.html" onMouseOver="imageChange('global','alt[2]','two','graphicon[2]')" onMouseOut="imageChange('global','alt[1]','two','graphic[2]')"><img src="/images/but_2.gif" width="98" height="23" name="two" border="0" alt=""></a>
</td></tr>
<tr><td valign="top" align="center">
[nbsp][nbsp][nbsp][nbsp][nbsp]<a href="page3.html" onMouseOver="imageChange('global','alt[2]','three','graphicon[3]')" onMouseOut="imageChange('global','alt[1]','three','graphic[3]')"><img src="/images/but_3.gif" width="98" height="23" name="three" border="0" alt=""></a>
</td></tr>
<tr><td valign="top" align="center">
[nbsp][nbsp][nbsp][nbsp][nbsp]<a href="page4.html" onMouseOver="imageChange('global','alt[2]','four','graphicon[4]')" onMouseOut="imageChange('global','alt[1]','four','graphic[4]')"><img src="/images/but_4.gif" width="98" height="23" name="four" border="0" alt=""></a>
</td></tr>
<tr><td valign="top" align="center">
[nbsp][nbsp][nbsp][nbsp][nbsp]<a href="page5.html" onMouseOver="imageChange('global','alt[2]','five','graphicon[5]')" onMouseOut="imageChange('global','alt[1]','five','graphic[5]')"><img src="/images/but_5.gif" width="98" height="23" name="five" border="0" alt=""></a>
</td></tr>
<tr><td valign="top" align="center">
[nbsp][nbsp][nbsp][nbsp][nbsp]<a href="page6.html" onMouseOver="imageChange('global','alt[2]','six','graphicon[6]')" onMouseOut="imageChange('global','alt[1]','six','graphic[6]')"><img src="/images/but_6.gif" width="98" height="23" name="six" border="0" alt=""></a>
</td></tr>
</table>
If it's not straight forward what everything means or does, let me know and I'd be happy to explain.
Dan
Mandi
02-15-2000, 10:09 AM
This is how I create my code for mouseover images:
http://wsabstract.com/mousewhipper/index.htm
They load very fast!
vBulletin® v3.6.8, Copyright ©2000-2013, Jelsoft Enterprises Ltd.