Hi,
It seems all my JavaScript skills disappeared when I learned php, cause I'm constantly finding myself stuck with simple Js problems. What I'm trying to do is obvious from the code. But it's not working.
It seems all my JavaScript skills disappeared when I learned php, cause I'm constantly finding myself stuck with simple Js problems. What I'm trying to do is obvious from the code. But it's not working.
Code:
<!--
function show_limits(that){
if(that.value==0){
document.getElementById("limit_to_state").style.display='none';
document.getElementById("limit_to_other").style.display='none';
} else if(that.value==1){
document.getElementById("limit_to_state").style.display='';
document.getElementById("limit_to_other").style.display='none';
} else if(that.value>1){
document.getElementById("limit_to_other").style.display='';
document.getElementById("limit_to_state").style.display='none';
}
//-->
</script>
<table border="0" cellspacing="1" cellpadding="4">
<form action="/view.php" method="post" name="orderby">
<input type="hidden" name="cat" value="NULL">
<tr>
<td>Limit Results to</td>
<td>
<select name="criteria" onchange="show_limits(this);">
<option value="0">Show All Trades</option>
<option value="1">State</option>
<option value="2">City</option>
<option value="3">Zip Code</option>
<option value="4">Area Code</option>
</select>
</td>
<td id="limit_to_state" style="display:none;">
<select name="limit_state">
<option value="">Select a State</option>
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="...">Etc...!!!</option>
</select>
</td>
<td id="limit_to_other" style="display:none;"><input type="text" name="limit_other" value=""></td>
</tr>
<tr>
<td colspan="3"><input type="submit" value="Refresh"></td>
</tr>
</form>
</table>
I know it's been asked before, but I'd just like to get this working with as little hassle as possible. As always, stars go to the first person to submit a working script.
Thanks!
Rick
[URL unfurl="true"]http://www.ristmo.com/[/URL]
[URL unfurl="true"]http://www.arabchurch.com/[/URL]
[URL unfurl="true"]http://www.cashfutures.com/[/URL]
[URL unfurl="true"]http://www.word-tools.com/[/URL]