Question : how can I display text based on a dropdown box selection?

Hello,

I'm trying to something rather simple.. at least it seemed simple.  On my html form there is a drop down box with store locations, just the city their located in.  When the customer selects what city I want a DIV or whatever else might work to display the full address and contact information.  How can I do this?

Thanks!

Answer : how can I display text based on a dropdown box selection?

Something like :

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
var addresses = ["address 1", "address2", "address 3"];
</script>
</head>
<body>
<select onchange="if(this.selectedIndex>0) document.getElementById('thediv').innerHTML = addresses[this.selectedIndex-1];else document.getElementById('thediv').innerHTML =''">
	<option value="">Choose one...</option>
	<option value="">Marc</option>
	<option value="">Ben</option>
	<option value="">Bob</option>
</select>
<div id="thediv"></div>
</body>
</html>
Random Solutions  
 
programming4us programming4us