By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,441 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

contentEditable

P: n/a
I have an DIV with the contentEditable attribute. How can I get the
value of the content within that DIV after the user has edited it for
further processing. I'd like to store the HTML code within the DIV to a
hidden INPUT. Thanks for your help!

Aug 26 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
wrote on 27 aug 2005 in comp.lang.javascript:
I have an DIV with the contentEditable attribute. How can I get the
value of the content within that DIV after the user has edited it for
further processing. I'd like to store the HTML code within the DIV to a
hidden INPUT. Thanks for your help!


<div id=d contentEditable>
....
<input type=hidden id=p>
....
function ... {

document.getElementById('p').value =
document.getElementById('d').innerHTML

}

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Aug 26 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.