You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/**
|
|
|
|
value.push(option[field])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if(value.length == 0){
|
|
|
|
value = 0
|
|
|
|
}else if (value.length == 1){
|
|
|
|
value = value[0]
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This function returns a value for checkboxes given a name
|
|
|
|
* @param {type} id name of the checkboxes
|
|
|
|
* @returns {value}
|
|
|
|
*/
|
|
|
|
_checkboxvalue = function(id){
|
|
|
|
ldoms = document.getElementsByName(id) ;
|
|
|
|
value = null;
|
|
|
|
for(var i=0; i < ldoms.length; i++){
|
|
|
|
if(ldoms[i].checked == true){
|
|
|
|
value = ldoms[i].value;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
_radiovalue = function(id){
|
|
|
|
return _checkboxvalue(id);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* Returns the input value of an input with type == text|password
|
|
|
|
* @param {type} id
|
|
|
|
* @returns {document@call;getElementById.value}
|
|
|
|
*/
|
|
|
|
_inputvalue = function(id){
|
|
|
|
_input = document.getElementById(id) ;
|
|
|
|
return _input.value ;
|
|
|
|
}
|
|
|
|
_spanvalue = function(id){
|
|
|
|
_input = document.getElementById(id) ;
|
|
|
|
return _input.innerHTML ;
|
|
|
|
}
|
|
|
|
|