version 1.68, 2015/09/13 21:48:37
|
version 1.69, 2015/11/21 00:16:09
|
Line 242 function month() {
|
Line 242 function month() {
|
function intminute() { |
function intminute() { |
var thisminutes=cmins; |
var thisminutes=cmins; |
var i; |
var i; |
choicewrite('<select name="minutes" onchange="parent.intcalc();">'); |
var result = ''; |
|
result += '<select name="minutes" onchange="parent.intcalc();">'; |
for (i=0;i<=59;i++) { |
for (i=0;i<=59;i++) { |
choicewrite('<option value="'+i+'"'); |
result += '<option value="'+i+'"'; |
if (i==thisminutes) { |
if (i==thisminutes) { |
choicewrite(' selected="selected"'); |
result += ' selected="selected"'; |
} |
} |
choicewrite('>'+i+'</option>'); |
result += '>'+i+'</option>'; |
} |
} |
choicewrite('</select>'); |
result += '</select>'; |
|
return result; |
} |
} |
|
|
function inthour() { |
function inthour() { |
var thishours=chours; |
var thishours=chours; |
var i; |
var i; |
choicewrite('<select name="hours" onchange="parent.intcalc();">'); |
var result = ''; |
|
result += '<select name="hours" onchange="parent.intcalc();">'; |
for (i=0;i<=23;i++) { |
for (i=0;i<=23;i++) { |
choicewrite('<option value="'+i+'"'); |
result += '<option value="'+i+'"'; |
if (i==thishours) { |
if (i==thishours) { |
choicewrite(' selected="selected"'); |
result += ' selected="selected"'; |
} |
} |
choicewrite('>'+i+'</option>'); |
result += '>'+i+'</option>'; |
} |
} |
choicewrite('</select>'); |
result += '</select>'; |
|
return result; |
} |
} |
|
|
function intsecond() { |
function intsecond() { |
var thisseconds=csecs; |
var thisseconds=csecs; |
var i; |
var i; |
choicewrite('<select name="seconds" onchange="parent.intcalc();">'); |
var result = ''; |
|
result += '<select name="seconds" onchange="parent.intcalc();">'; |
for (i=0;i<=59;i++) { |
for (i=0;i<=59;i++) { |
choicewrite('<option value="'+i+'"'); |
result += '<option value="'+i+'"'; |
if (i==thisseconds) { |
if (i==thisseconds) { |
choicewrite(' selected="selected"'); |
result += ' selected="selected"'; |
} |
} |
choicewrite('>'+i+'</option>'); |
result += '>'+i+'</option>'; |
} |
} |
choicewrite('</select>'); |
result += '</select>'; |
|
return result; |
} |
} |
|
|
|
|
function intday() { |
function intday() { |
var thisdate=cdays; |
var thisdate=cdays; |
var i; |
var i; |
choicewrite('<select name="date" onchange="parent.intcalc();">'); |
var result =''; |
|
result += '<select name="date" onchange="parent.intcalc();">'; |
for (i=0;i<=31;i++) { |
for (i=0;i<=31;i++) { |
choicewrite('<option value="'+i+'"'); |
result += '<option value="'+i+'"'; |
if (i==thisdate) { |
if (i==thisdate) { |
choicewrite(' selected="selected"'); |
result += ' selected="selected"'; |
} |
} |
choicewrite('>'+i+'</option>'); |
result += '>'+i+'</option>'; |
} |
} |
choicewrite('</select>'); |
result += '</select>'; |
|
return result; |
} |
} |
|
|
function intcalc() { |
function intcalc() { |
Line 376 function intervaldis() {
|
Line 384 function intervaldis() {
|
csecs-=chours*3600; |
csecs-=chours*3600; |
cmins=Math.floor(csecs/60); |
cmins=Math.floor(csecs/60); |
csecs-=cmins*60; |
csecs-=cmins*60; |
choicewrite(cdays+' days '+chours+' hours ' |
return cdays+' days '+chours+' hours '+cmins+' mins '+csecs+' secs'; |
+cmins+' mins '+csecs+' secs'); |
|
} |
} |
|
|
function pickcolor(picked) { |
function pickcolor(picked) { |
Line 494 function draw() {
|
Line 501 function draw() {
|
} |
} |
if (pscat=='interval') { |
if (pscat=='interval') { |
tablestart('Time interval'); |
tablestart('Time interval'); |
choicewrite('<tr><td colspan="3">'); |
choicewrite( [ |
intervaldis(); |
'<tr><td colspan="3">'+intervaldis()+'</td></tr>', |
choicewrite('</td></tr><tr><td>Time:' |
'<tr><td>Time:</td><td colspan="2">', |
+'</td><td colspan="2">'); |
'<span style="white-space:nowrap">'+intday()+' days </span>', |
intday();choicewrite('days '); |
'<span style="white-space:nowrap">'+inthour()+' hours</span>', |
inthour();choicewrite('hours '); |
'<span style="white-space:nowrap">'+intminute()+' mins</span>', |
intminute(); choicewrite('mins '); intsecond(); |
'<span style="white-space:nowrap">'+intsecond()+' secs</span>', |
choicewrite('secs</td></tr></table>'); |
'</td></tr>', |
choicewrite('<br />'); |
'</table>', |
|
'<br />', |
|
].join("\n")); |
tablestart('Provide a "Done" button to students?'); |
tablestart('Provide a "Done" button to students?'); |
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
choicewrite('<tr><td>Value:</td><td colspan="2">'); |
choicewrite('<label><input name="donebutton" value="_done"'+ |
choicewrite('<label><input name="donebutton" value="_done"'+ |