Annotation of rat/client/parameter.html, revision 1.16
1.1 www 1: <html>
2: <!--
3: The LearningOnline Network with CAPA
4: Parameter Input Window
1.16 ! albertel 5: //
! 6: // $Id: gplheader.js,v 1.1 2001/11/29 19:06:47 www Exp $
! 7: //
! 8: // Copyright Michigan State University Board of Trustees
! 9: //
! 10: // This file is part of the LearningOnline Network with CAPA (LON-CAPA).
! 11: //
! 12: // LON-CAPA is free software; you can redistribute it and/or modify
! 13: // it under the terms of the GNU General Public License as published by
! 14: // the Free Software Foundation; either version 2 of the License, or
! 15: // (at your option) any later version.
! 16: //
! 17: // LON-CAPA is distributed in the hope that it will be useful,
! 18: // but WITHOUT ANY WARRANTY; without even the implied warranty of
! 19: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 20: // GNU General Public License for more details.
! 21: //
! 22: // You should have received a copy of the GNU General Public License
! 23: // along with LON-CAPA; if not, write to the Free Software
! 24: // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
! 25: //
! 26: // /home/httpd/html/adm/gpl.txt
! 27: //
! 28: // http://www.lon-capa.org/
! 29: //
1.7 www 30: 06/16/00,06/17,11/17,11/18,11/23,11/27,11/28,12/15,12/16,
1.10 www 31: 03/21/01,03/24,06/26 Gerd Kortemeyer
1.11 www 32: 07/24/01 Scott Harrison
1.12 www 33: 08/08 Gerd Kortemeyer
1.1 www 34: -->
35: <head>
36: <title>LON-CAPA</title>
37: </head>
38:
39: <script>
40:
41: var ptype='';
42: var pvalue='';
43: var preturn='';
44: var pcode='';
1.2 www 45: var pscat='';
46: var pmarker='';
1.1 www 47: var pname='';
48:
49: var svalue;
1.2 www 50: var stype;
51: var smarker;
1.1 www 52:
53: var vars=new Array();
54:
1.2 www 55: var cdate=new Date();
56:
57: var csec;
58: var cmin;
59: var chour;
60: var cday;
61:
62: var months=new Array();
63:
64:
1.1 www 65: function selwrite(text) {
66: this.window.selector.document.write(text);
67: }
68:
69: function choicestart() {
70: this.window.choices.document.clear();
71: choicewrite('<html><body bgcolor="#FFFFFF">');
72: }
73:
74: function choiceend() {
75: choicewrite('</body></html>');
76: this.window.choices.document.close();
77: }
78:
79: function choicewrite(text) {
80: this.window.choices.document.write(text);
81: }
82:
83: function tablestart(headtext) {
84: choicewrite('<table><tr bgcolor="#AAFFAA"><th colspan=3>'+
85: headtext+'</th></tr>');
86: }
87:
88: function valline(text,id1,id2) {
89: choicewrite('<tr bgcolor="#AAFFAA"><td>'+text+
90: '</td><td><input type=text size=4 name=val'+
91: id1+'></td><td>incl:<input type=checkbox name=val'+
92: id2+'></td></tr>');
93: }
94:
1.2 www 95: function datecalc() {
96: var sform=choices.document.forms.sch;
97:
98: cdate.setHours(sform.hours.options[sform.hours.selectedIndex].value);
99: cdate.setMinutes(sform.minutes.options[sform.minutes.selectedIndex].value);
100: cdate.setSeconds(sform.minutes.options[sform.seconds.selectedIndex].value);
101: cdate.setDate(sform.date.options[sform.date.selectedIndex].value);
102: cdate.setMonth(sform.month.options[sform.month.selectedIndex].value);
103: cdate.setFullYear(sform.year.options[sform.year.selectedIndex].value);
104:
105: draw();
106: }
107:
108: function hour() {
109: var thishour=cdate.getHours();
110: var i; var j;
111: choicewrite('<select name=hours onChange="parent.datecalc();">');
112: for (i=0;i<=23;i++) {
113: choicewrite('<option value='+i);
114: if (i==thishour) {
115: choicewrite(' selected');
116: }
117: choicewrite('>');
118: if (i==12) { choicewrite('noon'); } else {
119: if (i==0) { choicewrite('midnight') } else {
120:
121: if (i<12) { choicewrite(i+' am'); } else {
122: j=i-12; choicewrite(j+' pm');
123: }
124:
125: }
126: }
127: choicewrite('</option>');
128: }
129: choicewrite('</select>');
130: }
131:
132: function minute() {
133: var thisminutes=cdate.getMinutes();
134: var i;
135: choicewrite('<select name=minutes onChange="parent.datecalc();">');
136: for (i=0;i<=59;i++) {
137: choicewrite('<option value='+i);
138: if (i==thisminutes) {
139: choicewrite(' selected');
140: }
141: choicewrite('>'+i+'</option>');
142: }
143: choicewrite('</select>');
144: }
145:
146: function second() {
147: var thisseconds=cdate.getSeconds();
148: var i;
149: choicewrite('<select name=seconds onChange="parent.datecalc();">');
150: for (i=0;i<=59;i++) {
151: choicewrite('<option value='+i);
152: if (i==thisseconds) {
153: choicewrite(' selected');
154: }
155: choicewrite('>'+i+'</option>');
156: }
157: choicewrite('</select>');
158: }
159:
160:
161: function date() {
162: var thisdate=cdate.getDate();
163: var i;
164: choicewrite('<select name=date onChange="parent.datecalc();">');
165: for (i=1;i<=31;i++) {
166: choicewrite('<option value='+i);
167: if (i==thisdate) {
168: choicewrite(' selected');
169: }
170: choicewrite('>'+i+'</option>');
171: }
172: choicewrite('</select>');
173: }
174:
175: function year() {
176: var thisyear=cdate.getFullYear();
177: var i;
178: choicewrite('<select name=year onChange="parent.datecalc();">');
179: for (i=thisyear-25;i<=thisyear+50;i++) {
180: choicewrite('<option value='+i);
181: if (i==thisyear) {
182: choicewrite(' selected');
183: }
184: choicewrite('>'+i+'</option>');
185: }
186: choicewrite('</select>');
187: }
188:
189: function month() {
190: var thismonth=cdate.getMonth();
191: var i;
192: choicewrite('<select name=month onChange="parent.datecalc();">');
193: for (i=0;i<=11;i++) {
194: choicewrite('<option value='+i);
195: if (i==thismonth) {
196: choicewrite(' selected');
197: }
198: choicewrite('>'+months[i]+'</option>');
199: }
200: choicewrite('</select>');
201: }
202:
203:
204: function intminute() {
205: var thisminutes=cmins;
206: var i;
207: choicewrite('<select name=minutes onChange="parent.intcalc();">');
208: for (i=0;i<=59;i++) {
209: choicewrite('<option value='+i);
210: if (i==thisminutes) {
211: choicewrite(' selected');
212: }
213: choicewrite('>'+i+'</option>');
214: }
215: choicewrite('</select>');
216: }
217:
218: function inthour() {
219: var thishours=chours;
220: var i;
221: choicewrite('<select name=hours onChange="parent.intcalc();">');
222: for (i=0;i<=23;i++) {
223: choicewrite('<option value='+i);
224: if (i==thishours) {
225: choicewrite(' selected');
226: }
227: choicewrite('>'+i+'</option>');
228: }
229: choicewrite('</select>');
230: }
231:
232: function intsecond() {
233: var thisseconds=csecs;
234: var i;
235: choicewrite('<select name=seconds onChange="parent.intcalc();">');
236: for (i=0;i<=59;i++) {
237: choicewrite('<option value='+i);
238: if (i==thisseconds) {
239: choicewrite(' selected');
240: }
241: choicewrite('>'+i+'</option>');
242: }
243: choicewrite('</select>');
244: }
245:
246:
247: function intday() {
248: var thisdate=cdays;
249: var i;
250: choicewrite('<select name=date onChange="parent.intcalc();">');
251: for (i=0;i<=31;i++) {
252: choicewrite('<option value='+i);
253: if (i==thisdate) {
254: choicewrite(' selected');
255: }
256: choicewrite('>'+i+'</option>');
257: }
258: choicewrite('</select>');
259: }
260:
261: function intcalc() {
262: var sform=choices.document.forms.sch;
263: svalue=((sform.date.options[sform.date.selectedIndex].value*24+
264: sform.hours.options[sform.hours.selectedIndex].value*1)*60+
265: sform.minutes.options[sform.minutes.selectedIndex].value*1)*60+
266: sform.seconds.options[sform.seconds.selectedIndex].value*1;
267: draw();
268: }
269:
1.6 www 270: function integereval() {
271: svalue=choices.document.forms.sch.intval.value;
272: svalue=Math.round(svalue);
273: if (pscat=='zeropos') { svalue=Math.abs(svalue); }
274: if ((pscat=='pos') && (svalue==0)) {
275: svalue='';
276: }
1.12 www 277: if (pscat.indexOf('inrange')!=-1) {
1.10 www 278: var rangeparts=new Array;
279: rangeparts=split('_',pscat);
1.12 www 280: rangeparts=split(',',rangeparts[1]);
1.10 www 281: if (svalue<rangeparts[0]) { svalue=rangeparts[0]; }
282: if (svalue>rangeparts[1]) { svalue=rangeparts[1]; }
283: }
1.6 www 284: draw();
285: }
286:
287: function floateval() {
288: svalue=choices.document.forms.sch.floatval.value;
289: svalue=1.0*svalue;
290: if (pscat=='pos') { svalue=Math.abs(svalue); }
291: if ((pscat=='zeroone') && ((svalue<0) || (svalue>1))) {
292: svalue='';
293: }
294: draw();
295: }
296:
297: function stringeval() {
298: svalue=choices.document.forms.sch.stringval.value;
299: draw();
300: }
301:
1.2 www 302: function intervaldis() {
303: csecs=svalue;
304: cdays=Math.floor(csecs/86400);
305: csecs-=cdays*86400;
306: chours=Math.floor(csecs/3600);
307: csecs-=chours*3600;
308: cmins=Math.floor(csecs/60);
309: csecs-=cmins*60;
310: choicewrite(cdays+' days '+chours+' hours '
311: +cmins+' mins '+csecs+' secs');
312: }
313:
1.1 www 314: function draw() {
315: choicestart();
1.6 www 316: choicewrite('<form name=sch');
317: if (ptype=='int') {
318: choicewrite(' action="javascript:integereval();"');
319: }
320: if (ptype=='float') {
321: choicewrite(' action="javascript:floateval();"');
322: }
323: if (ptype=='string') {
324: choicewrite(' action="javascript:stringeval();"');
325: }
326: choicewrite('>');
1.1 www 327: if (ptype=='tolerance') {
1.2 www 328: // 0: pscat
329: if (pscat=='default') {
1.1 www 330: tablestart('Use default value or algorithm of resource');
331: }
1.2 www 332: if (pscat=='relative_sym') {
1.1 www 333: // 2: percentage
334: // 3: open
335: tablestart('Percentage error, symmetric around value');
336: valline('Percentage',2,3);
1.13 www 337: if ((svalue!='') && (typeof(svalue)!="undefined")) {
338: choices.document.forms.sch.val2.value=parseInt(svalue);
339: if (svalue.indexOf('+')!=-1) {
340: choices.document.forms.sch.val3.checked=true;
341: }
342: }
1.1 www 343: }
1.2 www 344: if (pscat=='relative') {
1.1 www 345: // 2: left
346: // 3: open
347: // 4: right
348: // 5: open
349: tablestart('Percentage error, asymmetric around value');
350: valline('Upper percentage',2,3);
351: valline('Lower percentage',4,5);
1.13 www 352: var range=new Array;
353: if ((svalue!='') && (typeof(svalue)!="undefined")) {
354: range=svalue.split(',');
355: if (typeof(range[1])=='undefined') { range[1]=range[0]; }
1.15 www 356: choices.document.forms.sch.val2.value=parseFloat(range[0]);
1.13 www 357: if (range[0].indexOf('+')!=-1) {
358: choices.document.forms.sch.val3.checked=true;
359: }
1.15 www 360: choices.document.forms.sch.val4.value=parseFloat(range[1]);
1.13 www 361: if (range[1].indexOf('+')!=-1) {
362: choices.document.forms.sch.val5.checked=true;
363: }
364: }
1.1 www 365: }
1.2 www 366: if (pscat=='absolute_sym') {
1.1 www 367: tablestart('Absolute error, symmetric around value');
368: valline('Value',2,3);
1.13 www 369: if ((svalue!='') && (typeof(svalue)!="undefined")) {
1.15 www 370: choices.document.forms.sch.val2.value=parseFloat(svalue);
1.13 www 371: if (svalue.indexOf('+')!=-1) {
372: choices.document.forms.sch.val3.checked=true;
373: }
374: }
1.1 www 375: }
1.2 www 376: if (pscat=='absolute') {
1.1 www 377: tablestart('Absolute error, asymmetric around value');
378: valline('Upper value',2,3);
379: valline('Lower value',4,5);
1.13 www 380: var range=new Array;
381: if ((svalue!='') && (typeof(svalue)!="undefined")) {
382: range=svalue.split(',');
383: if (typeof(range[1])=='undefined') { range[1]=range[0]; }
1.15 www 384: choices.document.forms.sch.val2.value=parseFloat(range[0]);
1.13 www 385: if (range[0].indexOf('+')!=-1) {
386: choices.document.forms.sch.val3.checked=true;
387: }
1.15 www 388: choices.document.forms.sch.val4.value=parseFloat(range[1]);
1.13 www 389: if (range[1].indexOf('+')!=-1) {
390: choices.document.forms.sch.val5.checked=true;
391: }
392: }
1.1 www 393: }
394: }
395:
396: if (ptype=='date') {
1.2 www 397: if (pscat=='default') {
398: tablestart('Default value or none');
399: choicewrite('</table>');
400: } else {
401: if (pscat=='start') {
402: tablestart('Starting or opening date and time');
403: }
404: if (pscat=='end') {
405: tablestart('Ending or closing date and time');
406: }
407: if (pscat=='interval') {
408: tablestart('Time interval');
409: choicewrite('<tr bgcolor="#AAFFAA"><td colspan=3>');
410: intervaldis();
411: choicewrite('</td></tr><tr bgcolor="#AAFFAA"><td>Time:'
412: +'</td><td colspan=2>');
413: intday();choicewrite('days ');
414: inthour();choicewrite('hours ');
415: intminute(); choicewrite('mins '); intsecond();
416: choicewrite('secs</td></tr></table>');
417: } else {
418: choicewrite('<tr bgcolor="#AAFFAA"><td colspan=3>'
419: +cdate.toString()+
420: '</td></tr><tr bgcolor="#AAFFAA"><td>Date:</td><td colspan=2>');
421: month();date();year();
422: choicewrite('</td></tr><tr bgcolor="#AAFFAA"><td>Time:'
423: +'</td><td colspan=2>');hour();choicewrite('h ');minute();
424: choicewrite('m ');second();
425: choicewrite('s</td></tr></table>');
426: }
427: }
1.1 www 428: }
429:
1.6 www 430: if (ptype=='int') {
431: if (pscat=='default') {
432: tablestart('Default value or none');
1.14 www 433: choicewrite('</table>');
1.6 www 434: } else {
1.14 www 435: if (pscat=='range') {
436: tablestart('Integer range');
437: choicewrite('<tr bgcolor="#AAFFAA"><td>Lower Value:'+
438: '</td><td colspan=2><input type=text size=4 name=val2'+
439: '></td></tr>');
440: choicewrite('<tr bgcolor="#AAFFAA"><td>Upper Value:'+
441: '</td><td colspan=2><input type=text size=4 name=val4'+
442: '></td></tr></table>');
443: var range=new Array;
444: if ((svalue!='') && (typeof(svalue)!="undefined")) {
445: range=svalue.split(',');
446: if (typeof(range[1])=='undefined') { range[1]=range[0]; }
447: choices.document.forms.sch.val2.value=parseInt(range[0]);
448: choices.document.forms.sch.val4.value=parseInt(range[1]);
449: }
450: } else {
1.6 www 451: if (pscat=='pos') {
452: tablestart('Positive (non-zero) integer');
453: }
454: if (pscat=='zeropos') {
455: tablestart('Positive integer or zero');
456: }
1.12 www 457: if (pscat.indexOf('inrange')!=-1) {
1.10 www 458: var rangeparts=new Array;
1.12 www 459: rangeparts=split(',',pscat);
1.10 www 460: tablestart('Integer in the range ['+rangeparts[1]+']');
461: }
1.6 www 462: if (pscat=='any') {
463: tablestart('Integer');
464: }
465: choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>');
466: choicewrite('<input name=intval size=10 value="'+svalue+
467: '" name=intval onChange="parent.integereval()">');
468: choicewrite('</td></table>');
469: }
1.14 www 470: }
1.1 www 471: }
472:
1.6 www 473: if (ptype=='float') {
474: if (pscat=='default') {
475: tablestart('Default value or none');
476: choicewrite('</table>');
477: } else {
478: if (pscat=='pos') {
479: tablestart('Positive floating point number or zero');
480: }
481: if (pscat=='zeroone') {
482: tablestart('Floating point number between zero and one');
483: }
484: if (pscat=='any') {
485: tablestart('Floating point number');
486: }
487: choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>');
488: choicewrite('<input name=floatval size=10 value="'+svalue+
489: '" name=floatval onChange="parent.floateval()">');
490: choicewrite('</td></table>');
491: }
1.1 www 492: }
493:
1.6 www 494: if (ptype=='string') {
495: if (pscat=='default') {
496: tablestart('Default value or none');
497: choicewrite('</table>');
498: } else {
499: if (pscat=='any') {
500: tablestart('Text');
501: }
502: choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>');
503: choicewrite('<input name=intval size=20 value="'+svalue+
504: '" name=stringval onChange="parent.stringeval()">');
505: choicewrite('</td></table>');
506: }
1.1 www 507: }
508:
509: choicewrite('</table></form>');
510: choiceend();
511: }
512:
513: function sopt(va,text) {
514: selwrite('<option value="'+va+'"');
1.2 www 515: if (va==pscat) {
1.1 www 516: selwrite(' selected');
517: }
518: selwrite('>'+text+'</option>');
519: }
520:
521: function catchange() {
522: var sform=selector.document.forms.fsel.fcat;
1.2 www 523: pscat=sform.options[sform.selectedIndex].value;
1.1 www 524: draw();
525: }
526:
527: function assemble() {
1.2 www 528: if ((ptype=='date') && (pscat!='interval')) {
529: svalue=Math.round(cdate.getTime()/1000);
530: }
1.12 www 531: if (ptype=='tolerance') {
532: if (pscat=='relative_sym') {
533: svalue=choices.document.forms.sch.val2.value+'%';
534: if (choices.document.forms.sch.val3.checked) {
535: svalue+='+';
536: }
537: }
538: if (pscat=='absolute_sym') {
539: svalue=choices.document.forms.sch.val2.value;
540: if (choices.document.forms.sch.val3.checked) {
541: svalue+='+';
542: }
543: }
544: if (pscat=='absolute') {
545: svalue=choices.document.forms.sch.val2.value;
546: if (choices.document.forms.sch.val3.checked) {
547: svalue+='+';
548: }
549: svalue+=','+choices.document.forms.sch.val4.value;
550: if (choices.document.forms.sch.val5.checked) {
551: svalue+='+';
552: }
553: }
554: if (pscat=='relative') {
555: svalue=choices.document.forms.sch.val2.value+'%';
556: if (choices.document.forms.sch.val3.checked) {
557: svalue+='+';
558: }
559: svalue+=','+choices.document.forms.sch.val4.value+'%';
560: if (choices.document.forms.sch.val5.checked) {
561: svalue+='+';
562: }
563: }
1.14 www 564: }
565: if ((ptype=='int') && (pscat=='range')) {
566: svalue=choices.document.forms.sch.val2.value+','+
567: choices.document.forms.sch.val4.value;
1.12 www 568: }
1.6 www 569: if (pscat=='default') { svalue=''; }
1.2 www 570: stype=ptype+'_'+pscat;
1.1 www 571: }
572:
573:
574: function init() {
575: var i;
1.2 www 576: var subs=new Array();
1.1 www 577: var namevalue=this.window.location.search.split('&');
578: namevalue[0]=namevalue[0].substr(1,namevalue[0].length-1);
579:
580: for (i=0;i<namevalue.length;i++) {
581: var pair=namevalue[i].split('=');
1.3 www 582: pair[1]=unescape(pair[1]);
1.1 www 583: if (pair[0]=='value') { pvalue=pair[1]; }
1.2 www 584: if (pair[0]=='type') { subs=pair[1].split('_');
585: ptype=subs[0];
586: pscat=subs[1];
1.11 www 587: if (typeof(subs[2])!="undefined") {
588: pscat+='_'+subs[2];
589: }
590: if ((pscat=='') || (typeof(pscat)=="undefined")) {
1.6 www 591: pscat='default';
592: }
1.2 www 593: }
1.1 www 594: if (pair[0]=='return') { preturn=pair[1]; }
595: if (pair[0]=='call') { pcode=pair[1]; }
1.2 www 596: if (pair[0]=='marker') { pmarker=pair[1]; }
1.1 www 597: if (pair[0]=='name') { pname=pair[1]; }
598: }
599:
600: svalue=pvalue;
1.6 www 601: if (((ptype=='float') || (ptype=='string') || (ptype=='int')) &&
602: (pscat=='default') &&
1.11 www 603: (typeof(svalue)!="undefined") &&
604: (svalue!=0) && (svalue!='')) { pscat='any'; }
1.1 www 605:
1.13 www 606: if (ptype=='tolerance') {
607: var tperc=0;
608: var trange=0;
609: if (typeof(svalue)!='undefined') {
610: if (svalue.indexOf('%')!=-1) { tperc=1; }
611: if (svalue.indexOf(',')!=-1) { trange=1; }
612: if (trange) {
613: if (tperc) { pscat='relative'; } else { pscat='absolute'; }
614: } else {
615: if (tperc) { pscat='relative_sym'; } else { pscat='absolute_sym'; }
616: }
617: }
618: }
619:
1.1 www 620: this.window.selector.document.clear();
621: selwrite('<html><body bgcolor="#FFFFFF">');
622:
1.8 www 623: selwrite('<form name="fsel"><b>'+pname+'</b><br>');
1.1 www 624: selwrite('<select name="fcat" onChange="parent.catchange();">');
1.12 www 625:
1.1 www 626: if (ptype=='tolerance') {
627: sopt('default','Default');
628: sopt('relative_sym','Relative Tolerance, Symmetric (percent)');
629: sopt('relative','Relative Tolerance (percentages)');
630: sopt('absolute_sym','Absolute Tolerance, Symmetric (value)');
631: sopt('absolute','Absolute Tolerance (values)');
632: }
633:
634: if (ptype=='date') {
635: sopt('default','Default');
636: sopt('start','Starting Date');
637: sopt('end','Ending Date');
1.2 www 638: sopt('interval','Time Interval');
639:
1.11 www 640: if ((pvalue!='') && (typeof(pvalue)!="undefined")) {
1.2 www 641: cdate.setTime(pvalue*1000);
642: }
643:
644: months[0]='January';
645: months[1]='February';
646: months[2]='March';
647: months[3]='April';
648: months[4]='May';
649: months[5]='June';
650: months[6]='July';
651: months[7]='August';
652: months[8]='September';
653: months[9]='October';
654: months[10]='November';
655: months[11]='December';
1.1 www 656: }
1.2 www 657:
1.6 www 658: if (ptype=='int') {
659: sopt('default','Default');
660: sopt('pos','Positive Integer, Not Zero');
661: sopt('zeropos','Positive Integer or Zero');
1.13 www 662: sopt('inrange','Integer in Range');
663: sopt('range','Range of Integers');
1.6 www 664: sopt('any','Integer');
1.1 www 665: }
666:
1.6 www 667: if (ptype=='float') {
668: sopt('default','Default');
669: sopt('zeroone','Floating Point between 0 and 1');
670: sopt('pos','Positive Floating Point');
671: sopt('any','Floating Point');
1.1 www 672:
673: }
674:
1.6 www 675: if (ptype=='string') {
676: sopt('default','Default');
677: sopt('string','String Value');
1.1 www 678: }
679:
680: selwrite('</select></form>');
681:
1.2 www 682: selwrite('<a href="javascript:parent.assemble();');
1.1 www 683: if (preturn!='') {
1.4 www 684: selwrite(
685: 'parent.opener.document.'+preturn+'_value.value=parent.window.svalue;');
686: selwrite(
687: 'parent.opener.document.'+preturn+'_type.value=parent.window.stype;');
1.2 www 688: }
689: if (pmarker!='') {
1.4 www 690: selwrite(
691: 'parent.opener.document.'+preturn+'_marker.value=parent.window.pmarker;');
1.1 www 692: }
693: if (pcode!='') {
1.4 www 694: selwrite('parent.opener.'+pcode+'();');
1.1 www 695: }
1.4 www 696: selwrite('">Store</a> ');
1.5 www 697:
698: selwrite('<a href="javascript:');
699: selwrite(
700: 'parent.opener.document.'+preturn+'_value.value='+"'';");
701: if (pmarker!='') {
702: selwrite(
703: 'parent.opener.document.'+preturn+'_marker.value=parent.window.pmarker;');
704: }
705: if (pcode!='') {
706: selwrite('parent.opener.'+pcode+'();');
707: }
708: selwrite('">Delete</a> ');
1.4 www 709:
710: selwrite('<a href="javascript:');
711: if (preturn!='') {
712: selwrite('parent.opener.document.'+preturn+'_value.value='+"'';");
713: selwrite('parent.opener.document.'+preturn+'_type.value='+"'';");
714: }
715: if (pmarker!='') {
716: selwrite('parent.opener.document.'+preturn+'_marker.value='+"'';");
717: }
718: if (pcode!='') {
719: selwrite('parent.opener.'+pcode+'();');
720: }
721: selwrite('">Cancel</a>');
1.1 www 722:
723: selwrite('</body></html>');
724: this.window.selector.document.close();
1.2 www 725: draw();
1.1 www 726:
727: }
728:
729: </script>
730:
1.2 www 731: <frameset rows="120,*" onLoad="init();">
1.1 www 732: <frame name=selector src="empty.html">
733: <frame name=choices src="empty.html">
734: </frameset>
735:
736:
737:
1.16 ! albertel 738: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>