[RESOLVED] Not greying a disabled object

liunx

Guest
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...Try using readonly. (<!-- m --><a class="postlink" href="http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/readonly_1.asp">http://msdn.microsoft.com/workshop/auth ... only_1.asp</a><!-- m -->)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...So why do you want to confuse your users?

Changing the appearance of disabled form controls is a bad idea.I am "disabling" it so that the form doesn't pass the content to the server when the form is submitted.Why not just let it submit everything, then ignore what you don't want.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.Your visitors will expect disabled fields to be greyed out. If you change that they will think your form is broken.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'...
 
Top