/    Sign up×
Community /Pin to ProfileBookmark

Disabled Text Box

Question….is there anyway to change the apearance of a disabled text box. I need to auto-populate a field in a form using javascript but I don’t want the user to be able to change what is in the box. So i am trying to make the box easy to see but impossible to use.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@ryanbutlerJan 26.2007 — [CODE]<input type="text" name="foo" [B]disabled[/B]>[/CODE]
Copy linkTweet thisAlerts:
@orionbrock32authorJan 26.2007 — I have that, what I am wondering is can you change it so that the text box looks like a normal textbox but cannot be changed by the user. I have a way for it to work in firefox but nothing for ie as of now.

<i>
</i>&lt;style type="text/css"&gt;
input {
color: black;
}
input[disabled] {color:black!important;}
&lt;/style&gt;



<i>
</i>&lt;input type="text" name="finalDestination" disabled&gt;

Copy linkTweet thisAlerts:
@ryanbutlerJan 27.2007 — You mean like this:

[CODE]<html>
<head>
<style type="text/css">
input {
border:1px solid black;
background-color:#fff;
}
</style>
</head>
<body>
<input type="text" name="finalDestination" disabled>
</body>
</html>[/CODE]
×

Success!

Help @orionbrock32 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...