[LON-CAPA-cvs] cvs: rat /client parameter.html
www
lon-capa-cvs@mail.lon-capa.org
Wed, 10 Nov 2004 20:32:19 -0000
www Wed Nov 10 15:32:19 2004 EDT
Modified files:
/rat/client parameter.html
Log:
Bug #3465: radio-button-based parameter setting on Safari.
Safari does not honor "onChange" event for radio buttons, wants "onClick"
instead. Now firing both events.
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.28 rat/client/parameter.html:1.29
--- rat/client/parameter.html:1.28 Thu May 27 02:26:19 2004
+++ rat/client/parameter.html Wed Nov 10 15:32:19 2004
@@ -3,7 +3,7 @@
The LearningOnline Network with CAPA
Parameter Input Window
//
-// $Id: parameter.html,v 1.28 2004/05/27 06:26:19 albertel Exp $
+// $Id: parameter.html,v 1.29 2004/11/10 20:32:19 www Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -27,9 +27,6 @@
//
// http://www.lon-capa.org/
//
-06/16/00,06/17,11/17,11/18,11/23,11/27,11/28,12/15,12/16,
-03/21/01,03/24,06/26 Gerd Kortemeyer
-08/08 Gerd Kortemeyer
-->
<head>
<title>LON-CAPA</title>
@@ -309,6 +306,12 @@
draw();
}
+function callradiostringeval(newval) {
+ return 'onChange="parent.radiostringeval(\''
+ +newval+'\')" onClick="parent.radiostringeval(\''
+ +newval+'\')"';
+}
+
function intervaldis() {
csecs=svalue;
cdays=Math.floor(csecs/86400);
@@ -535,11 +538,11 @@
tablestart('Yes/No');
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>');
choicewrite('<input name="stringval" value="yes"'+
- ' type="radio" onChange="parent.radiostringeval(\'yes\')"');
+ ' type="radio" '+callradiostringeval('yes'));
if (svalue=='yes') { choicewrite(' checked'); }
choicewrite('> Yes<br />');
choicewrite('<input name="stringval" value="no"'+
- ' type="radio" onChange="parent.radiostringeval(\'no\')"');
+ ' type="radio" '+callradiostringeval('no'));
if (svalue=='no') { choicewrite(' checked'); }
choicewrite('> No<br />');
}
@@ -547,11 +550,11 @@
tablestart('Exam Type');
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>');
choicewrite('<input name="stringval" value="online"'+
- ' type="radio" onChange="parent.radiostringeval(\'online\')"');
+ ' type="radio" '+callradiostringeval('online'));
if (svalue=='online') { choicewrite(' checked'); }
choicewrite('> Online<br />');
choicewrite('<input name="stringval" value="checkout"'+
- ' type="radio" onChange="parent.radiostringeval(\'checkout\')"');
+ ' type="radio" '+callradiostringeval('checkout'));
if (svalue=='checkout') { choicewrite(' checked'); }
choicewrite('> Check out<br />');
}
@@ -559,31 +562,31 @@
tablestart('Question Type');
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>');
choicewrite('<input name="stringval" value="problem"'+
- ' type="radio" onChange="parent.radiostringeval(\'problem\')"');
+ ' type="radio" '+callradiostringeval('problem'));
if (svalue=='problem') { choicewrite(' checked'); }
choicewrite('> Standard Problem<br />');
choicewrite('<input name="stringval" value="quiz"'+
- ' type="radio" onChange="parent.radiostringeval(\'quiz\')"');
+ ' type="radio" '+callradiostringeval('quiz'));
if (svalue=='quiz') { choicewrite(' checked'); }
choicewrite('> Quiz<br />');
choicewrite('<input name="stringval" value="exam"'+
- ' type="radio" onChange="parent.radiostringeval(\'exam\')"');
+ ' type="radio" '+callradiostringeval('exam'));
if (svalue=='exam') { choicewrite(' checked'); }
choicewrite('> Exam<br />');
choicewrite('<input name="stringval" value="assess"'+
- ' type="radio" onChange="parent.radiostringeval(\'assess\')"');
+ ' type="radio" '+callradiostringeval('assess'));
if (svalue=='assess') { choicewrite(' checked'); }
choicewrite('> Assessment<br />');
choicewrite('<input name="stringval" value="survey"'+
- ' type="radio" onChange="parent.radiostringeval(\'survey\')"');
+ ' type="radio" '+callradiostringeval('survey'));
if (svalue=='survey') { choicewrite(' checked'); }
choicewrite('> Survey<br />');
choicewrite('<input name="stringval" value="form"'+
- ' type="radio" onChange="parent.radiostringeval(\'form\')"');
+ ' type="radio" '+callradiostringeval('form'));
if (svalue=='form') { choicewrite(' checked'); }
choicewrite('> Input Form<br />');
choicewrite('<input name="stringval" value="library"'+
- ' type="radio" onChange="parent.radiostringeval(\'library\')"');
+ ' type="radio" '+callradiostringeval('library'));
if (svalue=='library') { choicewrite(' checked'); }
choicewrite('> Library<br />');
}
@@ -597,15 +600,15 @@
tablestart('Allowed File Extensions');
choicewrite('<tr bgcolor="#AAFFAA"><td>Value:</td><td colspan=2>');
choicewrite('<input name="radstringval" value="txt"'+
- ' type="radio" onChange="parent.radiostringeval(\'txt\')"');
+ ' type="radio" '+callradiostringeval('txt'));
if (svalue=='txt') { choicewrite(' checked'); }
choicewrite('> Plain Text<br />');
choicewrite('<input name="radstringval" value="png,jpg,jpeg,gif"'+
- ' type="radio" onChange="parent.radiostringeval(\'png,jpg,jpeg,gif\')"');
+ ' type="radio" '+callradiostringeval('png,jpg,jpeg,gif'));
if (svalue=='png,jpg,jpeg,gif') { choicewrite(' checked'); }
choicewrite('> Picture File<br />');
choicewrite('<input name="radstringval" value="doc,xls,ppt"'+
- ' type="radio" onChange="parent.radiostringeval(\'doc,xls,ppt\')"');
+ ' type="radio" '+callradiostringeval('doc,xls,ppt'));
if (svalue=='doc,xls,ppt') { choicewrite(' checked'); }
choicewrite('> Office Document<br />');
choicewrite('<input name="stringval" size="20" value="'+svalue+