Newsgroup: it.comp.lang.javascript
Titolo: InnerText

Hi,
this page will only work with IE4, maybe NN4, but hasn't been tested yet.
placing the mouse over a line of text in the bottom left hand corner, changes text above and to the side.  How would this code be
changed so that 'info' would show text (as current) and 'pics' would show an image.  I should images the 'pics.innerText' needs
changing.  I've checked the IE4 tour as this seems to be similar,  but I couldn't work out what was what.
here's the code. I've also attached it as a file if this makes it any easier.
<!--start code-->
<HTML>
<HEAD><TITLE>innerText test</TITLE></HEAD>
<BODY bgcolor="#000000">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="150">
<span id="pics" style="display:none; font: 8pt Tahoma; color:#2DBCEC"></span>
</td>
<td width="200" height="150">
<span id="info" style="display:none; font: 8pt Tahoma; color:#2DBCEC"></span>
</td>
</tr>
<tr>
<td width="200" style="margin-left:1in">
<span id="text" style="font: 10pt Tahoma; color:#2DBCEC; cursor:hand; text-decoration:underline"
onMouseOver="info.innerText='The BLOB Online active channel makes a multitude of information available at your fingertips';
info.style.display='';
pics.innerText='images/chantit.gif';
pics.style.display=''"
onMouseOut="info.innerText=' ';
info.style.display='none';
pics.innerText=' ';
pics.style.display='none'">
What It Offers...<BR>
</span>
</td>
</tr>
</table>
</BODY>
</HTML>
<!--end code-->
please could you reply by e-mail rather than to the group.
Thanks in advance
Ade
http://freespace.virgin.net/cm.parker/
 - soon to be totally updated

...
:Hi,
:
:this page will only work with IE4, maybe NN4, but hasn't been tested yet.
the image swap that I've added will probably work, but the other stuff will
not; you're using the IE4 DOM.
:placing the mouse over a line of text in the bottom left hand corner,
changes text above and to the side.  How would this code be
:changed so that 'info' would show text (as current) and 'pics' would show
an image.  I should images the 'pics.innerText' needs
:changing.  I've checked the IE4 tour as this seems to be similar,  but I
couldn't work out what was what.
:
:
:here's the code. I've also attached it as a file if this makes it any
easier.
:
:<!--start code-->
:
:<HTML>
:
:<HEAD><TITLE>innerText test</TITLE></HEAD>
:
:<BODY bgcolor="#000000">
:
:<table border="0" cellpadding="0" cellspacing="0">
:<tr>
:<td width="200" height="150">
  <IMG width="200" height="150" id="pics" SRC="images/trans.gif">
<!-- where trans.gif is a 1x1 pixel transparent gif -->
:</td>
:<td width="200" height="150">
:<span id="info" style="display:none; font: 8pt Tahoma;
color:#2DBCEC"></span>
:</td>
:</tr>
:
:
:<tr>
:<td width="200" style="margin-left:1in">
:
:<span id="text" style="font: 10pt Tahoma; color:#2DBCEC; cursor:hand;
text-decoration:underline"
:onMouseOver="info.innerText='The BLOB Online active channel makes a
multitude of information available at your fingertips';
:info.style.display='';
  oldsrc = pics.src;
  pics.src = 'images/chantit.gif';"
:onMouseOut="info.innerText=' ';
:info.style.display='none';
  pics.src = oldsrc;">
:What It Offers...<BR>
:</span>
:</td>
:</tr>
:</table>
:
:</BODY>
:
:
:</HTML>
:
:<!--end code-->
As for replying by email? No. Please read the CLJ FAQ.
cheers,
~stuart
to put me in my happy place:
* no email copies of posts to clj
* no js questions via email; post to clj
* repeat after me: java != javascript