|
Posted by Jonathan N. Little on 08/24/05 16:32
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
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|