View Full Version : Read-Only Div Block
codeexploiter
06-04-2007, 10:41 AM
Hi all,
Is it possible to achieve a pure read-only div block. As you are aware contentEditable and unselectable works only in IE but I am looking for a method which is compatible with both IE and Mozilla Firefox.
Thanks in advance.
Regards
CodeExploiter
jscheuer1
06-04-2007, 03:31 PM
Division elements on an HTML page are normally read-only.
codeexploiter
06-05-2007, 03:59 AM
Division elements on an HTML page are normally read-only.
I think I haven't provided one valuable information. I need a read-only <div> block within a rich-text editor which is based on JavaScript. I want to create a section which is not editable for the users of the editor.
<div contentEditable='false' unselectable='true'></div>
The above code working as I wanted in IE. I am looking for a method which will work both in IE and Firefox or even a Firefox based method will do good for me.
senglory
02-22-2012, 01:20 PM
In my case these attributes dot' work at all event in IE:
<html >
<body>
<div contentEditable='false' unselectable='true' style="disabled:true" >
<span dir="ltr"><input name="ctl00$PlaceHolderMain$ctl01$ctl00$FormField1$ctl00$ctl00$onetidIOFile" type="text" value="!!! 1, 987 ?? 10.2.12" maxlength="123" id="ctl00_PlaceHolderMain_ctl01_ctl00_FormField1_ctl00_ctl00_onetidIOFile" title="---" class="ms-long" Size="35" /></span>
</div>
</body>
</html>
The textbox still allows me entering and keystrokes. I wonder how to disable it indirectly (via manipulation with proper <DIV> attributes and styles).
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.