homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

JS text change
Without using form inputs.

 10:18 pm on May 16, 2002 (gmt 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)

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)

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


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

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved