im passing a value retrieved from an ajax call to a function like this way:
nuevaFila+='<td><input type="button" value="Agregar" onclick="AgregarSuvenir('+item.CODSUVENIR+');"></td></tr>';
and we i clicked the button it throws an undefinided "variable" but is not a variable, i just wanted to pass it as a string, and the value passed to the function is taken as a variable, i tried
onclick="AgregarSuvenir("'+item.CODSUVENIR+'") and onclick="AgregarSuvenir('+item.CODSUVENIR+""')
but this fails
someone help me how to pass the value as string and not be taken a a variable.
thanks is advance