Talk:Foundations Lecture - Introduction to Human Development

From Embryology
Revision as of 09:58, 17 April 2012 by Z8600021 (talk | contribs)

Fri 1,038

Tue 19 April 2011 Time: 09:00 AM - 10:00 AM Location: Central Lecture Block 7, Kensington Activity: Lecture


--Mark Hill 09:58, 17 April 2012 (EST) Birthdate javascript not executable on wiki page



<script type="text/javascript" language="JavaScript">


var maxday=new Array(12) maxday[1]=31 maxday[2]=28 maxday[3]=31 maxday[4]=30 maxday[5]=31 maxday[6]=30 maxday[7]=31 maxday[8]=31 maxday[9]=30 maxday[10]=31 maxday[11]=30 maxday[12]=31

var monthname=new Array(12) monthname[1]="January" monthname[2]="February" monthname[3]="March" monthname[4]="April" monthname[5]="May" monthname[6]="June" monthname[7]="July" monthname[8]="August" monthname[9]="September" monthname[10]="October" monthname[11]="November" monthname[12]="December"

function calc(form){ var newmonth,newday,newyear day=form.Day.value year=form.Year.value month=form.Month.value newday=eval(day)+7 newmonth=eval(month)-3 newyear=eval(year) var max=maxday[month] if(month==2&&(year%4==0)){max=29}if(day>max){datestring="Wrong date, please correct and recalculate"}else{if(newday>max) {newday=newday-max newmonth=newmonth+1} if(newmonth<1){newmonth=newmonth+12}else{if(newmonth>12){newmonth=newmonth-12}newyear=newyear+1}var max=maxday[newmonth] if(newday>max){newday=newday-max newmonth=newmonth+1} var datestring=monthname[newmonth]+" "+newday+", "+newyear } form.due.value=datestring }

function today_click() {

  var theForm = document.info;
  var nowDate = new Date();
  theForm.Day.options[nowDate.getDate() - 1].selected = true;
  theForm.Month.options[nowDate.getMonth()].selected = true;
  theForm.Year.options[nowDate.getFullYear()- 2010].selected = true;

}

</script>




<noscript>NOTE: You need Javascript to use the calculator, which your browser has apparently disabled.</noscript>
<form name="info">

The only information required is....
"When did your last period begin?"

<select name="Month" size="1"> <option selected value="1">January</option> <option value="2">February</option> <option value="3">March</option> <option value="4">April</option> <option value="5">May</option> <option value="6">June</option> <option value="7">July</option> <option value="8">August</option> <option value="9">September</option> <option value="10">October</option> <option value="11">November</option> <option value="12">December</option> </select><select name="Day" size="1"> <option selected value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select><select name="Year" size="1"> <option value="2010">2010</option> <option selected value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> </select></select>
<input type="button" value="Insert today's date" onclick="today_click()" style="background-color:#ddddff">
<input type="button" value="Calculate" onclick="calc(this.form);return true;" style="background-color:#ddddff"><input type="reset" value="Reset" style="background-color:#ddddff">

Your approximate due date is:
<input type="text" size="40" name="due"></form>