All Downloads are FREE. Search and download functionalities are using the official Maven repository.

static.scripts.Form.js Maven / Gradle / Ivy

There is a newer version: 0.41.3
Show newest version
function boxAction(box, action){
	var val = "";
	if (box)
	{
		if (! box[0])
		{
			if (action == "selected")
			{
				return box.checked;
			} else if (action == "value")
			{
				if (box.checked)
					val = box.value;
			} else if (action == "toggle")
			{
				box.checked = ! box.checked;
			}
		} else
		{
			for (var i=0; i=0; i--){   
		if (options[i].selected){  
			options[i] = null;
		}
	}
}

function moveSelectedOption(srcSelect, destSelect){
	for (var i=0; i4){
       if (args[4]=="join"){
          tempIds = joinIds(document.all[idsTarget].value, ids);
          tempDescriptions = joinNames(document.all[descriptionsTarget].value, descriptions);
       }
       if (args[4]=="reset"){
          tempIds = "";
          tempDescriptions = "";
       }
   } else {
       tempIds = ids;
       tempDescriptions = descriptions;
   }
   
   document.all[idsTarget].value = tempIds;
   document.all[descriptionsTarget].value = tempDescriptions;
}

/*?????????id????????????????????????*/
function joinIds(targetIds, joinIds){
   if (targetIds != ""){
       var tempIds = joinIds.split(",");
       var currentIds = "," + targetIds + ",";
       
       for (var i=0; i0)){
              currentIds = currentIds + tempIds[i] + ",";
          }
       }
       
       var ids = currentIds.split(",");
       var finalIds = ",";
       for (var i=0; i0)){
              currentNames = currentNames + tempNames[i] + ",";
          }
       }
       
       var names = currentNames.split(",");
       var finalNames = ",";
       for (var i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy