homepage Welcome to WebmasterWorld Guest from 54.197.147.90
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Visit PubCon.com
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.
Filipe




msg:1475667
 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.

 

DrDoc




msg:1475668
 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.

Beagle




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

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

DrDoc




msg:1475670
 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