elyob said the following on 6/6/2006 7:44 PM:
"Randy Webb" <Hi************@aol.com> wrote in message
news:r5******************************@comcast.com. .. elyob said the following on 6/6/2006 1:52 PM: Hi,
I'm just wondering how I change some css text when I mouseover a picture.
At the moment document.write just writes to a new page.
function displayname(name)
{
document.write(name);
}
<a href="#" onMouseOver="displayname('Autumn Brown')"
onMouseOut="hidename()"><img src="img/autumnbrown.jpg" width="70"
alt="Autumn Brown" border="0"></a>
Try reading the group FAQ. Specifically the section on DynWrite. It is
titled "How do I modify the current page in a browser?"
Thanks, sorry for being crap....
Just wondering, is it cleaner to use an iframe and update a small area than
refresh the whole page (as your faq suggests).
The FAQ doesn't suggest refreshing the entire page. DynWrite modifies
the innerHTML of a container object. You can do that, quite easily,
without refreshing an entire page.
Whether you use an IFrame or the DynWrite method would depend on what
you are wanting to change. For what you want to do, use DynWrite and
change the innerHTML of a div tag.
A better alternative for just the code you posted is the title attribute
of the img tag.
--
Randy
comp.lang.javascript FAQ -
http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/