|
Posted by Neredbojias on 08/25/05 00:33
With neither quill nor qualm, Jonathan N. Little quothed:
> Neredbojias wrote:
> <snip>
> >
> > 1. ID the remote block of text.
> >
> > 2. Create a function/2 functions called by your mouseover events (-
> > instead of putting the js right in the "onmouseover" link if that's what
> > you do now.)
> >
> > 3. In the function(s), do the innerHTML thing to change the text in the
> > ided larger block of text as well as whatever it is you do with the
> > mouseovers now.
> >
> > Example:
> >
> > In the function(s) include:
> >
> > document.getElementById('lgtxtblock').innerHTML="AES does *not* stand
> > for 'Ants Eat Shit.'"'
> >
>
> Small point, *innerHTML* is a MSIE property. Many browsers now include
> it by demand. The W3C compatible way would be with *nodeValue*:
>
> var el=document.getElementById('lgtxtblock');
> el.firstChild.nodeValue="AES does *not* stand for 'Ants Eat Shit.'";
>
> Added benifit, your script may be markedly faster!
> http://www.gtalbot.org/DHTMLSection/innerHTMLvsNodeValue.html
Hmm, I will have to check this out. Never even heard of nodeValue
before.
Thanks for the information and advice.
--
Neredbojias
Contrary to popular belief, it is believable.
[Back to original message]
|