/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Not greying a disabled object

Is there any way to avoid an object that is disabled to be shown as greyed out? I want to disable some objects so that the user cannot edit them, but I still want to shown them in their full colur (rather than greyed out, which the browser seems to do automatically)?

thanks a lot for any advice…

to post a comment
CSS

7 Comments(s)

Copy linkTweet thisAlerts:
@KravvitzMar 28.2006 — [url=http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/readonly_1.asp]Try using readonly.[/url]
Copy linkTweet thisAlerts:
@VicauthorMar 29.2006 — Good idea, but works only for <textarea> and <input type=text> and <input type=password>. I also want to disable other types of inputs, as well as <select> box. Furthermore, I am "disabling" it so that the form doesn't pass the content to the server when the form is submitted.

Any thoughts would be much appreciated...
Copy linkTweet thisAlerts:
@KravvitzMar 29.2006 — So why do you want to confuse your users?

Changing the appearance of disabled form controls is a bad idea.
Copy linkTweet thisAlerts:
@David_HarrisonMar 29.2006 — I am "disabling" it so that the form doesn't pass the content to the server when the form is submitted.[/QUOTE]Why not just let it submit everything, then ignore what you don't want.
Copy linkTweet thisAlerts:
@mrhooMar 30.2006 — The latest Css will let you set styles for elements with attributes (like 'disabled').

But a lot of browsers aren't there yet.

If you are willing to use javascript, instead of disabling your elements, you can write a faux disable function to capture and return false for mouse and key events.
Copy linkTweet thisAlerts:
@felgallMar 30.2006 — Your visitors will expect disabled fields to be greyed out. If you change that they will think your form is broken.
Copy linkTweet thisAlerts:
@VicauthorMar 31.2006 — Actually, the purpose of the page is to allow interactivity with different parts of the page depending on the user status. Hence, for some users section A & B may be enabled, and section C & D disabled. For other users this may be opposite, and so on...

What I'd like to do is to let user see the full design of the page (rather than parts greyed out), whilst still being able to interact with only those sections to which they have access.

If the greying is a must, so be it. I was hoping, however, there may have been something I was missing that would allow me to disable an object and yet keep it in full 'style'...
×

Success!

Help @Vic 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.17,
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,
)...