I have a JS function that calls an ajax and I pass the parameters (codigo, id_trigger, info1,..., info10)
and passing info1 = document.getElementById('textTicker').value
it turns a string, if I give console.log(info1)
it returns me the text itself: "document.getElementById ('textTicker') .value "and not really the value of the field.
Is there any way I can get this value from the field?
info1 = "document.getElementById('textTicker').value";
function CallAjaxGenerico(codigo, id_trigger, info1, info2, info3, info4, info5, info6, info7, info8, info9, info10){
$('#'+id_trigger).change(function(){
$.ajax({
...
data : {
'CODIGO' : codigo,
'INFO1' : document.getElementById(''+id_trigger+'').value,
'INFO2' : info1
}
});
}
and console.log (info1) returns "document.getElementById ('textTicker'). value"