For continued disscussion on this topic : Mouse over for text?
atifman
07-01-2000, 06:52 PM
After I mouseover a link, I want it to display text right beside it, and when I mouseout, I want it erase the text it just displayed. What I could do is display the text in the status bar, or put the text in an image and do it that way, but I want to do it like that. How do I do it?
Vincent Puglia
07-01-2000, 08:37 PM
Hi,
If I understand you right:
div layers is the way to go. You need to id the divs, position them and then call the functions below with a mouseover. The following 2 function were modified from my "dHTML: an Introduction" script. The script uses a checkbox to do the displaying, but the priniciples are the same.
function displayIt(hideIt)
{
if (document.layers)
document.layers['myLayer'].visibility = (hideIt) ? 'hide' : 'show';
else
document.all['myLayer'].style.visibility = (hideIt) ? 'hidden' : 'visible';
}
function writeIt(value)
{
var txt = value;
if (document.layers)
{
document.layers['myLayer'].document.open();
document.layers['myLayer'].document.write(txt);
document.layers['myLayer'].document.close();
} else
document.all.myLayer.innerHTML = txt;
}
Vinny
Arielladog
07-01-2000, 08:49 PM
here's one that might be easier for you to understand...
http://www.dynamicdrive.com/dynamicindex5/linkinfo2.htm
atifman
07-02-2000, 12:30 AM
I'm not gonna use your script but thanks anyway, Vincent. :)
Thanks Arielladog (This script I am gonna use)!!
Arielladog
07-02-2000, 01:15 AM
no problem...glad it helped!
P.S.-in the script, you canhave proper coding .. they have bad coding by doing:
<ilayer><layer></ilayer></layer>...I would do it <ilayer><layer></layer></ilayer>
Vincent Puglia
07-02-2000, 03:04 AM
Hi people,
Just to let you know -- the layer tags have been deprecated by the W3org (the standards people). That means that as the browser versions go up, the number of browsers that support the tag will disappear. So, if you expect the page to last further than (say) version 7 or 8 (we're up to 6 now), you're in trouble for 2 reasons:
1) the code eventually won't work with the "newest and best"
2) you should be learning dHTML.
Vinny
Arielladog
07-02-2000, 04:35 AM
forgot about layers not being supported soon. ALso, layers won't be supported in NS 6.0 (which is very soon)...dynamic drive will update their script when this happens, though.
Powered by vBulletin® Version 4.1.12 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.