View Single Post
Old 11-11-2012, 04:45 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,392
Thanks: 18
Thanked 351 Times in 350 Posts
sunfighter is on a distinguished road
Welcome to the forums emembee,
When your in the message box writing your post You will see a tool bar above you. Use the hash mark (the #) to get the code tags to put your code into.

Here's my version of your answer. Any questions just ask:
Code:
<!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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title></title>

<style type="text/css">
#selectsize
{
  width:900px
}
</style>
</head>

<body>
<div id="selectsize">
	<select id="Select1" onchange="selone();">
		<option value="">Band Material</option>
		<option value="Silver">Sterling Silver</option>
		<option value="Gold">14k Gold Plate</option>
	</select>&nbsp;&nbsp;&nbsp;&nbsp;

	<select id="Select2" onchange="selone();">
		<option value="">Ring Size</option>
		<option value="Small">Small</option>
		<option value="Large">Large</option>
	</select>&nbsp;&nbsp;&nbsp;&nbsp;
<span id="price">Pick the Band Material</span>
</div>

<script type="text/javascript">
function selone()
{
  var band = document.getElementById('Select1').value;
  var size = document.getElementById('Select2').value;

  if(size == "")
    document.getElementById('price').innerHTML = "Now Select the Size";
  if(band == "")
    document.getElementById('price').innerHTML = "Now Select the Band Material";

 if(band == "Gold")
 {
  if(size == "Small") document.getElementById('price').innerHTML = "Cost of small gold";
  if(size == "Large") document.getElementById('price').innerHTML = "Cost of large gold";

 }

  if(band == "Silver")
  {
    if(size == "Small") document.getElementById('price').innerHTML = "Cost of small silver";
    if(size == "Large") document.getElementById('price').innerHTML = "Cost of large silver";
  }
}
</script>
</body>
</html>
sunfighter is offline   Reply With Quote