this is the code:
<?php $countrycode=$p["country"]; ?>
<select size="1" name="countrycode" id="countrycode" onchange="javascript:
if(this.value=='USA') {
document.getElementById('us').style.display='block';
} else {
document.getElementById('us').style.display='none';
}
if(this.value=='DE') {
document.getElementById('de').style.display='block';
} else {
document.getElementById('de').style.display='none';
}
">
<option value="INT" <?php
if($countrycode=='INT') { echo 'selected="selected"'; } ?>
>International</option>
<option value="USA" <?php
if($countrycode=='USA') { echo 'selected="selected"'; } ?>
>USA</option>
<option value="DE" <?php
if($countrycode=='DE') { echo 'selected="selected"'; } ?>
>DE</option>
</select>
This is what I get as result:
When it is the value 'DE' nothing appears below.
When it is the value 'USA' all (even the ones for 'DE') appears. Like this:
Also allow: Canada ¦ United Kingdom ¦ Australia display:none;" id="de"> (>> last part shouldn't be displayed - means display:none;" id="de">)
Also allow: Switzerland Austria (>> this should actually displays on value 'DE')
Would very appreciate a solution that is helping me out.
Here is the missing echo (just forgot)
" id="us">
Also allow:
value="1"> Canada
value="1"> United Kingdom
value="1"> Australia
" id="de">
Also allow:
value="1"> Switzerland
value="1"> Austria