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

Unsure of what even to catch.

P: n/a
hi,
i have a form, and htere is a dropdown list with countries. i would
like for when i click ona a country that is not canada or usa. to
"gray" out a province text box.

so first question is it posisble to gray out text boxes? if so is it
blur()?

my second question is what even would be called if i opened the list an
clicked zimbabwe?
thanks in advance
-morc

Feb 1 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a

morc wrote:
hi,
i have a form, and htere is a dropdown list with countries. i would
like for when i click ona a country that is not canada or usa. to
"gray" out a province text box.

so first question is it posisble to gray out text boxes? if so is it
blur()?
Yes, you can "gray out" the <input> element by setting disabled to
true.

html:

<form name = "myForm">
<input type = "text" name = "input1">
</form>

javascript:

document.forms["myForm"].elements["input1"].disabled = true;
my second question is what even would be called if i opened the list an
clicked zimbabwe?


On the <select> element, you can place an onchange event handler.

Feb 1 '06 #2

P: n/a
thanks alot. couldn't find it on nomrla google

Feb 1 '06 #3

P: n/a
morc said the following on 2/1/2006 3:58 PM:
hi,
i have a form, and htere is a dropdown list with countries. i would
like for when i click ona a country that is not canada or usa. to
"gray" out a province text box.
disable it.
so first question is it posisble to gray out text boxes? if so is it
blur()?
onchange
my second question is what even would be called if i opened the list an
clicked zimbabwe?


onchange

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 1 '06 #4

P: n/a
morc wrote:
hi,
i have a form, and htere is a dropdown list with countries. i would
like for when i click ona a country that is not canada or usa. to
"gray" out a province text box.
Are Canada and USA the only countries in the world with provinces? Why
bother to grey it out at all? If the person has an equivalent to
province or state for their address they can put it in there. If not,
they can leave it blank.

[...] my second question is what even would be called if i opened the list an
clicked zimbabwe?


Zimbabwe has 10 provinces: Bulawayo, Harare, Manicaland, Mashonaland
Central, Mashonaland East, Mashonaland West, Masvingo, Matabeleland
North, Matabeleland South and Midlands.

More information on international address formats:

<URL:http://www.bitboost.com/ref/international-address-formats.html>
<URL:http://www.columbia.edu/kermit/postal.html>
But do not be restrictive of what the user can enter. Leave address
fields available, people will put in them whatever is appropriate. For
example, a full address for Hong Kong requires 4 to 6 lines, for
Australia 3 or 4.

When you send mail to someone you don't include the field name, just the
content so the fact that someone puts a state or county name in the
province field is irrelevant.

Some names for administrative divisions (statoids) :

arrondissement - French Guiana, Reunion
county - Denmark, Ireland
department - France, Honduras, Paraguay
district - Hong Kong, Israel, Poland
governorate - Egypt, Yemen
municipality - Puerto Rico, Qatar
parish - Andora, Jamaica
prefecture - Greece, Japan
province - Afghanistan, Ecuador, Equatorial Guinea, Iraq, Jordan
region - Ghana, Iceland
subject - Russian Federation

Source:
<URL:http://www.statoids.com/statoids.html>
--
Rob
Feb 2 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.