Welcome to WebmasterWorld Guest from 54.159.26.69

Forum Moderators: open

Message Too Old, No Replies

JS text change

Without using form inputs.

     

Filipe

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

10+ Year Member



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.

DrDoc

11:35 pm on May 16, 2002 (gmt 0)

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



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.

Beagle

1:33 am on May 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi Filipe, you can do this with the innerHTML and/or innerText properties.

DrDoc

5:26 am on May 17, 2002 (gmt 0)

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



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

Featured Threads

Hot Threads This Week

Hot Threads This Month