Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / August 2005



Tip: Looking for answers? Try searching our database.

edit div content ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
toto - 31 Aug 2005 10:33 GMT
hello

is there a way to edit the content of a div ? for instance to change :

<div>
foo
</div>

into

<div>
ree
</div>

thanks !
windandwaves - 31 Aug 2005 10:44 GMT
> hello
>
[quoted text clipped - 11 lines]
>
> thanks !

Here is an untested example.  No idea if it is any good, but it will
probably work.

<div id="DivExample" onmouseover="show('DivExample', 'ree');"
onmouseout="show('DivExample', '&nbsp;');" >&nbsp;</div>

<script type="text/javascript><!--
function show (eln, msg) {
 if(document.getElementById) {
  var el =  document.getElementById(eln);
  el.innerHTML = msg;
  return true;
 }
return false;
}
//--></script>
toto - 31 Aug 2005 10:52 GMT
sorry sorry sorry...
I found that :
http://fr.selfhtml.org/javascript/objets/node.htm#node_value

it's in french, but the code is quite simple and works as well with a div
as with a p

> hello
>
[quoted text clipped - 11 lines]
>
> thanks !
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.