Click to See Complete Forum and Search --> : dynamically change a line of html


chestertb
08-01-2003, 10:14 PM
Hi all,

I am a relative newbie at this javascript stuff, but understand enough to have been able to create mouseover scripts and onclick scripts to swap named images, or change table cell background colours.

I want to step up one level, and create a script that substitutes and redraws a whole line of html within a specific table cell.

The application is a simple multi level menu which uses icons rather than text. When the user positions the mouse over the icon in line 1, I want to change and redraw the html code in line 2 to display associated linked icons .

Note that I'm reasonably savvy... just point me in the right direction here.

ctb

pyro
08-01-2003, 11:16 PM
You can use innerHTML to do that:

<script type="text/javascript">
document.getElementById("theidofsomeelement").innerHTML = "Your text";
</script>