View Single Post
Old 11-06-2012, 08:01 PM   PM User | #3
jmrker
Senior Coder

 
jmrker's Avatar
 
Join Date: Aug 2006
Location: FL
Posts: 2,765
Thanks: 29
Thanked 453 Times in 447 Posts
jmrker will become famous soon enough
Lightbulb

Here is a start to what I believe you want. Modify to your <3's content.
Adding the jump-links is easy when you provide the URLs associated with each team.
Code:
<!DOCTYPE HTML>
<html>
<head>
<title> Untitled </title>
<style type="text/css">
.league { display:none; }
</style>
<script type="text/javascript">
function showLeague(info) {
  var sel = document.getElementById('leagues').getElementsByTagName('div');
  for (var i=0; i<sel.length; i++) { sel[i].style.display = 'none'; }
  document.getElementById(info).style.display = 'block';
}
</script>
</head>
<body>
<input type="radio" name="leagues" value="AFC" onclick="showLeague(this.value)">AFC
<input type="radio" name="leagues" value="NFC" onclick="showLeague(this.value)">NFC
<input type="radio" name="leagues" value="MLB_AL" onclick="showLeague(this.value)">MLB - AL
<input type="radio" name="leagues" value="MLB_NL" onclick="showLeague(this.value)">MLB - NL
<div id="leagues">
 <div id="AFC" class="league">
  <select id="AFCteams">
   <option value=''> Choose AFC-East team </option>
   <option value='Miami Dolphins'> Miami Dolphins </option>
   <option value='Buffalo Bills'> Buffalo Bills </option>
   <option value='New England Patriots'> New England Patriots </option>
   <option value='New York Jets'> New York Jets </option>
  </select>
 </div>
 <div id="NFC" class="league">
  <select id="NFCteams">
   <option value=''> Chose NFC-East team </option>
   <option value='Dallas Cowboys'> Dallas Cowboys </option>
   <option value='New York Giants'> New York Giants </option>
   <option value='Washington Redskins'> Washington Redskins </option>
   <option value='Philadelphia Eagles'> Philadelphia Eagles </option>
  </select>
 </div>
 <div id="MLB_AL" class="league">
  <select id="ALEteams">
   <option value=''> Choose AL-East team </option>
   <option value='Tampa Bay Rays'> Tampa Bay Rays </option>
   <option value='Baltimore Oriels'> Baltimore Oriels </option>
   <option value='Boston Red Sox'> Boston Red Sox </option>
   <option value='New York Yankees'> New York Yankees </option>
   <option value='Toronto Blue Jays'> Toronto Blue Jays </option>
  </select>
 </div>
 <div id="MLB_NL" class="league">
  <select id="NLEteams">
   <option value=''> Choose NL-East team </option>
   <option value='Miami Marlins'> Miami Marlins </option>
   <option value='Atlanta Braves'> Atlanta Braves </option>
   <option value='New York Mets'> New York Mets </option>
   <option value='Philadelphia Phillies'> Philadelphia Phillies </option>
   <option value='Washington Nationals'> Washington Nationals </option>
  </select>
 </div>
</div>
</body>
</html>
jmrker is offline   Reply With Quote