|
Posted by Toby Inkster on 08/27/05 09:25
Jonathan N. Little wrote:
> 1: I know of no such DIV attribute 'contentEditable'.
It's invalid, true, but it works in IE. Mozilla has a similar, though
slightly different extension.
> 2: Why would you use a DIV for user input? There are a whole host of
> defined form element for that purpose! Try a FORM with a
> TEXTAREA...unless your intentions involve subterfuge...
TEXTAREA can't contain bold text, text of varying sizes, italics, etc.
contentEditable allows you to create a little WYSIWYG editor within a page.
It's not much good on the public internet, but is fairly handy for
intranets, and for the admin sections of public sites (e.g. within a CMS
tool).
The OP wants to look at document.getElementById('foo').innerHTML I think.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Navigation:
[Reply to this message]
|