...

View Full Version : display picture instead of text



no way
05-28-2006, 09:19 PM
hello!

i cannot code in javascript but try to look good using the work of others ;-)
now, seriously: i have found a cool dynamic menu i'd like to use in a different way.

moving the mouse over a menu item shows some text somewhere else i can define. instead of showing this text, i'd like a picture to show up when moving the mouse cursor over the menu item.

-is that possible with this menu?
- if yes, what do i need to change? let's say my pictures would be "pic1.gif" and "pic2.gif".

thanks a lot for the reply in advance
cheers
fred


here the menu:

in <head>

<script language="javascript">
<!--
/*Menu by Clarence Eldefors (http://www.freebox.com/cereweb)*/
function movein(which,html){
which.style.background="#c94b4b"
if (document.getElementById)
document.getElementById("boxdescription").innerHTML=html
else
boxdescription.innerHTML=html
}

function moveout(which){
which.style.background='tan'
if (document.getElementById)
document.getElementById("boxdescription").innerHTML='&nbsp;'
else
boxdescription.innerHTML='&nbsp;'
}
//-->
</script>

in <body>

<table bgcolor="#dff9f9" border="1" bordercolor="#dff9f9" cellpadding="2" cellspacing="0" height=100% width="100">

<tr>
<td bgcolor="tan" border="1" height="70">
<center>
<img src="Pic_Sax.jpg" width="78" height="54" border="0" align="middle">
</center>
</td></tr>

<tr>
<td height="28" class="menu" bordercolor="#dff9f9" id="choice1" style="background-color:tan; cursor:hand"
onmouseover="movein(this,'where it all begun')" onmouseout="moveout(this)">
<a href="http://www.htmlbasix.com/htmlbasics.shtml">html basix</a></td></tr>

<tr>
<td height="28" class="menu" bordercolor="#dff9f9" id="choice2" style="background-color:tan; cursor:hand"
onmouseover="movein(this,'Free Java applets')" onmouseout="moveout(this)">
<a href="http://freewarejava.com">freewarejava</a></td></tr>

<tr>
<td height="28" class="menu" bordercolor="#dff9f9" id="choice3" style="background-color:tan; cursor:hand"
onmouseover="movein(this,'what about CSS, JS, Flash ?')" onmouseout="moveout(this)">
<a href="http://www.w3schools.com/default.asp">more learning</a></td></tr>

<tr>
<td height="28" class="menu" bordercolor="#dff9f9" id="choice4" style="background-color:tan; cursor:hand"
onmouseover="movein(this,'blabla')" onmouseout="moveout(this)">
<a href="http://www.mtv.com/onair/jackass">need a break?</a></td></tr>

<tr>
<td bgcolor="tan">
</td></tr>

<tr>
<td bordercolor="#dff9f9" bgcolor="ivory" height="48">
<font id="boxdescription" face="Verdana" size="2" color="#c94b4b">
</font></td></tr>

</table>

vwphillips
05-28-2006, 09:30 PM
onmouseover="movein(this,'<img src="One.gif" >')"

no way
05-29-2006, 08:53 AM
cool vic, thanks a lot.

for those who wish to use this, the exact code is:
onmouseover="movein(this,'<img src=Pic1.gif >')".

cheers
fred



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum