Update to static JS - 'hitem' hidden fields now optional for lockoptions.

This commit is contained in:
sam_marshall
2006-09-20 15:04:57 +00:00
parent 43a8ceeaf1
commit 027d048574
+9 -5
View File
@@ -42,10 +42,10 @@ function checknone() {
}
function lockoptions(form, master, subitems) {
// subitems is an array of names of sub items
// requires that each item in subitems has a
// Subitems is an array of names of sub items.
// Optionally, each item in subitems may have a
// companion hidden item in the form with the
// same name but prefixed by "h"
// same name but prefixed by "h".
if (eval("document."+form+"."+master+".checked")) {
for (i=0; i<subitems.length; i++) {
unlockoption(form, subitems[i]);
@@ -60,12 +60,16 @@ function lockoptions(form, master, subitems) {
function lockoption(form,item) {
eval("document."+form+"."+item+".disabled=true");/* IE thing */
eval("document."+form+".h"+item+".value=1");
if(document.forms[form].elements['h'+item]) {
eval("document."+form+".h"+item+".value=1");
}
}
function unlockoption(form,item) {
eval("document."+form+"."+item+".disabled=false");/* IE thing */
eval("document."+form+".h"+item+".value=0");
if(document.forms[form].elements['h'+item]) {
eval("document."+form+".h"+item+".value=0");
}
}
function submitFormById(id) {