Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Y'know how Javascript can swap pictures onmouseover? Well, I want to do that with text (particularly text files, but any sort of text will do)...is it possible without using Flash?
Thanks in advance and sorry if this question has already been answered...I searched, but couldn't find it.

look into the 'innerText' or 'innerHTML' attributes of various objects.
For example, I believe that you can change the contents inside a table cell by changing the innerText/innerHTML attributes.
Another approach, if you are just swapping some text back and forth between two (or a small number) of values, is to create a DIV for each text value and then show and hide them. For example, you create to DIVs of the same size and location and put different text into each one. You set one to be hidden and one shown, then swap the show/hide values.It's been a while since I've done this so I can't give more specific answers.
Look around www.dynamicdrive.com and you might find some examples.
Also, doing this type of thing and keeping compatible with non-IE browsers takes some work. If you choose not to support pre-IE 4 and pre-Netscape 6, it will make your compatibility issues easier to deal with.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |