Welcome to WebmasterWorld Guest from 54.198.114.138

Forum Moderators: open

Message Too Old, No Replies

JS text change

Without using form inputs.

     
10:18 pm on May 16, 2002 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 25, 2002
posts:470
votes: 0


Is there some sort of field or DIV I could change the text contents of using Javascript? I'm making a mock up design for someone, and what they want is nav-images, and when you rollover them, the text in a description box changes. I don't want to do image rollovers, and I want to avoid using things like <INPUT> and <TEXTAREA> tags.
11:35 pm on May 16, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


Well, depending on how many links you have, you can always have a few hidden DIVs and change the CSS visibility on a MouseOver event .. Or, if you want, you can actually change the text in the DIV using JavaScript, even though I'd prefer the first alternative.
1:33 am on May 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 8, 2005
posts:833
votes: 0


hi Filipe, you can do this with the innerHTML and/or innerText properties.
5:26 am on May 17, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 15, 2002
posts:6807
votes: 0


.. even though innerHTML and innerText isn't as widely supported as the visibility property ..