473,903 Members | 6,268 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unsure of what even to catch.

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
4 1153

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
thanks alot. couldn't find it on nomrla google

Feb 1 '06 #3
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.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Feb 1 '06 #4
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.co m/ref/international-address-formats.html>
<URL:http://www.columbia.ed u/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.co m/statoids.html>
--
Rob
Feb 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

66
6663
by: Mike Stenzler | last post by:
I am new to Template programming and I would like to create an array of user-defined class objects using MFC CArray. Normally I would use linked list processing - create an object class and then an object-list class, but in this instance array processing would be more efficient. However I need to use arrays that can dynamically shrink and grow ala Visual Basic arrays. I'm confused as to how to declare/implement the CArray using my Class....
24
2370
by: Steven T. Hatton | last post by:
If I understand correctly, I have no assurance that I can determine the type of a simple class instance thrown as an exception unless I explicitly catch it by name. (non-derived classes having no virtual funcitons have no rtti) That is, there is no way to do something like: try{ funct_from_3rd_party(); } catch(...){ std:err << extract_name() << std::endl; }
41
3468
by: Mountain Bikn' Guy | last post by:
What is the current preferred way to save user preferences in dotnet? Is the registry the right place to do this? Can anyone recommend a good article (or book) for this topic? Thanks.
9
343
by: Steven Blair | last post by:
Hi, I need to catch exceotions on File.Delete() After checking the help, I have noticed that thgere are serevral Exceptions that can be thrown. My question is, should I catch all thes Exceptions, or if I simply do the following: try
13
5074
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
24
2186
by: Dave | last post by:
Maybe I'm missing something here, but I can't see the purpose of the 'finally' keyword. What is the difference between: try { doSomething() } catch { handleError(); }
4
4680
by: garyusenet | last post by:
Hi I'm using the following code which is finally working. Public Class Form1 Shared ActElement As Object Shared ActFields As DataSet Public Sub SetActElement() Dim objApp As New Object
5
1885
by: stevewilliams2004 | last post by:
I was wondering if someone could explain the output I am getting for the program below. What I expected from the main program output was "Cat" but instead I see "Mammal". The output is also included below. I got the same results with GCC 3.4.4 under cygwin as with MSDev studio 2003. Even stranger to me, if I change the catch statement to catch a Cat instead of a Mammal, the program crashes in the catch body, during the call to...
16
2183
by: HillBilly | last post by:
This is freaking me out. I'm using Membership and trying to determine if the database is online. The GetConnectionString( ) method returns a connection string as expected but not when used in the try block. I have the Open() and Close() methods commented out while using the Response.Redirect to test. The code in the try block as shown will --never execute-- but the code in the catch block --always executes-- whether the database is...
0
9999
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9848
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11284
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9687
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5894
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4727
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4308
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3324
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.