i have this html code:

<table border="0" width="24%" cellspacing="0" cellpadding="0">
	<tr>
		<td width="62"></td>
	</tr>
	<tr>
		<td width="62"><span>Country<span>:</span></span></td>
		<td><select name="country" class="cbbody">
		<option selected>Select a Country</option>
		<option value="CA">Canada</option>
		<option value="US">United States</option>
		<option>--------------------------------</option>
		<option value="FR">france</option>
		<option value="ES">Spain</option>
		<option value="DE">Germany</option>
		<option value="IT">Italy</option>
		</select></td>
	</tr>
	</td>
	<tr>
		<td width="62">State<span>:</span></td>
		<td><select name="state" class="cbbody">
		<option value selected>Select a State</option>
		<option value="AL">Alabama</option>
		<option value="AK">Alaska</option>
		<option value="AZ">Arizona</option>
		<option value="AR">Arkansas</option>
		<option value="CA">California</option>
		<option value="CO">Colorado</option>
		<option value="CT">Connecticut</option>
		<option value="DE">Delaware</option>
		<option value="DC">District of Columbia</option>
		<option value="FL">Florida</option>
		<option value="GA">Georgia</option>
		<option value="HI">Hawaii</option>
		<option value="ID">Idaho</option>
		<option value="IL">Illinois</option>
		<option value="IN">Indiana</option>
		<option value="IA">Iowa</option>
		<option value="KS">Kansas</option>
		<option value="KY">Kentucky</option>
		<option value="LA">Louisiana</option>
		<option value="ME">Maine</option>
		<option value="MD">Maryland</option>
		<option value="MA">Massachusetts</option>
		<option value="MI">Michigan</option>
		<option value="MN">Minnesota</option>
		<option value="MS">Mississippi</option>
		<option value="MO">Missouri</option>
		<option value="MT">Montana</option>
		<option value="NE">Nebraska</option>
		<option value="NV">Nevada</option>
		<option value="NH">New Hampshire</option>
		<option value="NJ">New Jersey</option>
		<option value="NM">New Mexico</option>
		<option value="NY">New York</option>
		<option value="NC">North Carolina</option>
		<option value="ND">North Dakota</option>
		<option value="OH">Ohio</option>
		<option value="OK">Oklahoma</option>
		<option value="OR">Oregon</option>
		<option value="PA">Pennsylvania</option>
		<option value="RI">Rhode Island</option>
		<option value="SC">South Carolina</option>
		<option value="SD">South Dakota</option>
		<option value="TN">Tennessee</option>
		<option value="TX">Texas</option>
		<option value="UT">Utah</option>
		<option value="VT">Vermont</option>
		<option value="VA">Virginia</option>
		<option value="WA">Washington</option>
		<option value="WV">West Virginia</option>
		<option value="WI">Wisconsin</option>
		<option value="WY">Wyoming</option>
		<option value="OUT">Outside the US</option>
		<option value="null">---------------------------</option>
		<option value="AB">Alberta</option>
		<option value="BC">British Columbia</option>
		<option value="MB">Manitoba</option>
		<option value="NB">New Brunswick</option>
		<option value="NL">Newfoundland and Labrador</option>
		<option value="NT">Northwest Territories</option>
		<option value="NS">Nova Scotia</option>
		<option value="NU">Nunavut</option>
		<option value="ON">Ontario</option>
		<option value="PE">Prince Edward Island</option>
		<option value="QC">Quebec</option>
		<option value="SK">Saskatchewan</option>
		<option value="YT">Yukon</option>
		</select></td>
	</tr>
	<tr>
		<td width="62">Other: </td>
		<td><input type="text" name="other" size="20"></td>
	</tr>
</table>

i need from some one professional with java script to make this option:
- if we select "canada" or "usa" in the country list then "other" text zone must be disabled and "state" list must be enabled ...
- and if we select the other countrys (france, Spain,Germany,Italy) then must "other" text zone must be enabled and "state" list must be disabled ...
tnx

You actually want "help for JavaScript", not Java. If you want someone to write the code for you, this forum might not be the best choice. Here is a good place to get help with code you are writing.

This job would be a good first JavaScript program. I'd make the irrelevant dropdowns disappear and just show the relevant one. You might also want to format with CSS, not a table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.