Unsure of what even to catch.

M

morc

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
 
W

web.dev

morc said:
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.
 
R

Randy Webb

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
 
R

RobG

morc said:
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top