Reply to Re: Replacing text with mouseover?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация