By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

disabling form input elements

P: n/a
Hi.

Is there any way to make form input elements inactive, ie to disable them?

I've seen such a thing in VB but can't find anything in HTML/Javascript
references.

Thanks.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Bill" <so*****@here.com> writes:
Is there any way to make form input elements inactive, ie to disable them?
There are different ways, depending on what you mean by disable:

formElem.disabled = true;

Setting it "disabled" means that you can't use it (edit text, click
button), and it isn't sent when the form is submitted.

formElem.readOnly = true;

A text (input/textarea) can be set readOnly. Then it just can't be
changed, but is still submitted.
I've seen such a thing in VB but can't find anything in HTML/Javascript
references.


What did you write in VB?

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.