Forum Moderators: open
i'm trying to make this cms in javascript,
but i ran in to a problem:
i can't figure out how to replace the content of a <div> (not iframe :P)
here's what i want, the <div> contains some text and pictures:
<div id="div1">blablabla<img src="hello.png">blabla</div>
i want to replace this content "blablabla<img src="hello.png">blabla" with: "whatever<img src="whatever.png">whatever"
how do i manage this in javascript, thanx a lot!
greetings jelle
<snip>
... and reference your element ids in a much eaiser fashion (well it's much easier when you have a lot of these.)
$('div1').innerHTML = 'whatever<img src="whatever.png">whatever';
[edited by: encyclo at 1:51 pm (utc) on Nov. 16, 2006]
[edit reason] terms of service [webmasterworld.com] [/edit]