views:

773

answers:

4

I need to hide the text box blinking cursor in CSS / Javascript.

Is it possible?

A: 

To be exact: Do you want to allow input in this text box without blinking cursor shown?

JohnM2
This isn't an answer. Put questions for clarification in the comments under the question.
Aaron
What's the lower rep-cap for posting comments? Currently he's at 89, and I think it used to be 150 before you were allowed/able to post comments to others' questions/answers? (It's not ideal, regardless, but perhaps understandable)
David Thomas
You only need 50 rep to post comments.
Aaron
@ricebowl - I appreciate your "give the guy a break" level of understanding, comments are enabled at 50 rep, but if he's new he may simply not know "protocol"
curtisk
Ah, my bad then; at +50 he really should've had time to get used to the etiquette. =)
David Thomas
+1  A: 
<input type=text disabled=true />

because i can't see any other reason you might want to do that.

gcb
I need to edit the text box but blinking cursor should not be shown.
santose
@santose: Why? What's the issue with the cursor? just curious?
curtisk
I want to customize it where it should not look like text box
santose
The correct attribute value is `disabled` and not `true`: `disabled="disabled"`.
Gumbo
@Gumbo: that's correct for XHTML, but there's not often a need to use XHTML. Easiest is to write pages in HTML and use just `disabled`, with no value.
Tim Down
@Tim Down: The correct value for HTML is `disabled` too. There it’s just that the attribute value can be omitted since the only valid attribute value `disabled` is implied (see http://www.w3.org/TR/html4/interact/forms.html#adef-disabled).
Gumbo
@Gumbo: well yes. There are two correct ways of using a boolean attribute in HTML 4: on its own with no value or with a value that is the same as its name. Neither is more correct than the other, although the following line at the bottom of http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3.4.2 is worth noting: "Authors should be aware that many user agents only recognize the minimized form of boolean attributes and not the full form.".
Tim Down
A: 

Santose, you need to make a custom web control and inherit textbox class.

Making a custom web control sounds interesting. But how do you do that?
Majid
A: 

Try CodeMirror as an text input solution. Its nice and im sure you can tune it to hide blinking cursor if you want to...

NilColor