Team:Freiburg/Project/toolkit

From 2013.igem.org

(Difference between revisions)
Line 10: Line 10:
############################################################################## -->
############################################################################## -->
-
<script language="JavaScript" type="text/javascript">
+
<script type="text/javascript">
-
/*<![CDATA[*/
+
        function showDiv (divId)
-
function Test(rad){
+
        {
-
var rads=document.getElementsByName(rad.name);
+
          var div = document.getElementById (divId);
-
document.getElementById('courier').style.display=(rads[1].checked||rads[3].checked)?'none':'block';
+
          var divs = document.getElementsByTagName('div');
-
document.getElementById('depot').style.display=(rads[1].checked||rads[3].checked)?'block':'none';
+
          for (var i in divs)
-
}
+
          {
-
/*]]>*/
+
            divs [i].className = "hidden";
-
</script>
+
          }
 +
          div.className = "shown";
 +
        }
 +
    </script>
Line 37: Line 40:
}
}
-
 
+
.hidden {
 +
display:none;
 +
}
 +
.shown {
 +
display:block;
 +
}
Line 84: Line 92:
<div id="first_checkboxes">
<div id="first_checkboxes">
-
<input name="selection" type="radio" value="Silver Service"  onclick="Test(this);"/>
+
<input type="radio" onclick="showDiv ('1')" name="selectme">1</input>
-
<input name="selection" type="radio" value="Gold Service"  onclick="Test(this);"/>
+
        <input type="radio" onclick="showDiv ('2')" name="selectme">2</input>
-
<input name="selection" type="radio" value="Platinum Service" onclick="Test(this);"/>
+
        <input type="radio" onclick="showDiv ('3')" name="selectme">3</input>
-
<input name="selection" type="radio" value="Diamond Service"  onclick="Test(this);"/>
+
        <input type="radio" onclick="showDiv ('4')" name="selectme">4</input>
 +
 
</div>
</div>
<div id="answer_first_checkboxes">
<div id="answer_first_checkboxes">
-
<div id="courier">Select your courier:<br />
+
      <div id="1" class="hidden">Hey, its me, 1</div>
-
                    Blah blah....Dropdown to come here</div>
+
        <div id="2" class="hidden">Hey, its me, 2</div>
-
</p>
+
        <div id="3" class="hidden">Hey, its me, 3</div>
-
                    <div id="depot"><p>Select the closest depot for parcel drop-off: Blah blah....dropdown to come here
+
        <div id="4" class="hidden">Hey, its me, 4</div>
-
                                            </p></div>
+
</div>
</div>

Revision as of 23:37, 17 September 2013


1 2 3 4