--- rat/client/parameter.html 2000/06/28 03:41:48 1.1
+++ rat/client/parameter.html 2001/12/19 17:22:29 1.16
@@ -2,7 +2,35 @@
LON-CAPA
@@ -14,14 +42,26 @@ var ptype='';
var pvalue='';
var preturn='';
var pcode='';
-var poptions='';
+var pscat='';
+var pmarker='';
var pname='';
var svalue;
+var stype;
+var smarker;
-var scat;
var vars=new Array();
+var cdate=new Date();
+
+var csec;
+var cmin;
+var chour;
+var cday;
+
+var months=new Array();
+
+
function selwrite(text) {
this.window.selector.document.write(text);
}
@@ -52,32 +92,256 @@ function valline(text,id1,id2) {
id2+'>');
}
-function afterproc() {
- choicewrite('Error after rounding: '
- +' |
');
+function datecalc() {
+ var sform=choices.document.forms.sch;
+
+ cdate.setHours(sform.hours.options[sform.hours.selectedIndex].value);
+ cdate.setMinutes(sform.minutes.options[sform.minutes.selectedIndex].value);
+ cdate.setSeconds(sform.minutes.options[sform.seconds.selectedIndex].value);
+ cdate.setDate(sform.date.options[sform.date.selectedIndex].value);
+ cdate.setMonth(sform.month.options[sform.month.selectedIndex].value);
+ cdate.setFullYear(sform.year.options[sform.year.selectedIndex].value);
+
+ draw();
+}
+
+function hour() {
+ var thishour=cdate.getHours();
+ var i; var j;
+ choicewrite('');
+}
+
+function minute() {
+ var thisminutes=cdate.getMinutes();
+ var i;
+ choicewrite('');
+}
+
+function second() {
+ var thisseconds=cdate.getSeconds();
+ var i;
+ choicewrite('');
+}
+
+
+function date() {
+ var thisdate=cdate.getDate();
+ var i;
+ choicewrite('');
+}
+
+function year() {
+ var thisyear=cdate.getFullYear();
+ var i;
+ choicewrite('');
+}
+
+function month() {
+ var thismonth=cdate.getMonth();
+ var i;
+ choicewrite('');
+}
+
+
+function intminute() {
+ var thisminutes=cmins;
+ var i;
+ choicewrite('');
+}
+
+function inthour() {
+ var thishours=chours;
+ var i;
+ choicewrite('');
+}
+
+function intsecond() {
+ var thisseconds=csecs;
+ var i;
+ choicewrite('');
+}
+
+
+function intday() {
+ var thisdate=cdays;
+ var i;
+ choicewrite('');
+}
+
+function intcalc() {
+ var sform=choices.document.forms.sch;
+ svalue=((sform.date.options[sform.date.selectedIndex].value*24+
+ sform.hours.options[sform.hours.selectedIndex].value*1)*60+
+ sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+
+ sform.seconds.options[sform.seconds.selectedIndex].value*1;
+ draw();
+}
+
+function integereval() {
+ svalue=choices.document.forms.sch.intval.value;
+ svalue=Math.round(svalue);
+ if (pscat=='zeropos') { svalue=Math.abs(svalue); }
+ if ((pscat=='pos') && (svalue==0)) {
+ svalue='';
+ }
+ if (pscat.indexOf('inrange')!=-1) {
+ var rangeparts=new Array;
+ rangeparts=split('_',pscat);
+ rangeparts=split(',',rangeparts[1]);
+ if (svaluerangeparts[1]) { svalue=rangeparts[1]; }
+ }
+ draw();
+}
+
+function floateval() {
+ svalue=choices.document.forms.sch.floatval.value;
+ svalue=1.0*svalue;
+ if (pscat=='pos') { svalue=Math.abs(svalue); }
+ if ((pscat=='zeroone') && ((svalue<0) || (svalue>1))) {
+ svalue='';
+ }
+ draw();
+}
+
+function stringeval() {
+ svalue=choices.document.forms.sch.stringval.value;
+ draw();
}
+function intervaldis() {
+ csecs=svalue;
+ cdays=Math.floor(csecs/86400);
+ csecs-=cdays*86400;
+ chours=Math.floor(csecs/3600);
+ csecs-=chours*3600;
+ cmins=Math.floor(csecs/60);
+ csecs-=cmins*60;
+ choicewrite(cdays+' days '+chours+' hours '
+ +cmins+' mins '+csecs+' secs');
+}
+
function draw() {
choicestart();
- choicewrite('