<script type=»text/javascript»>
jQuery( document ).ready(function() {
vartextos;
varobj= { uiddocumento:’8d43c77c-dfd1-43cd-b367-7de9184effac’ };
jQuery.ajax({
type:»POST»,
contentType:»application/json; charset=utf-8″,
url:»https://consentimientos.com/webservice/api.asmx/getPlantilla»,
data:JSON.stringify(obj),
datatype:»json»,
success:function (data) {
//alert(«Successfully register»);
console.log(data);
textos=data.d;
},
error:function (data) {
console.log(data);
}
}).done(function(){
varobj= {par1:», par2:»};
jQuery.ajax({
type:»POST»,
contentType:»application/json; charset=utf-8″,
url:»https://consentimientos.com/webservice/api.asmx/getdatosempresa»,
data:JSON.stringify(obj),
datatype:»json»,
success:function (response) {
//alert(«Successfully register»);
console.log(response);
response_json=JSON.parse(response.d);
jQuery.each(response_json, function (i, item) {
textos=textos.replace(/razon_social/g, item.razon);
});
jQuery(‘#divplantilla’).html(textos);
},
error:function (response) {
console.log(response);
}
});
});
});
</script>
<divid=»divplantilla»></div>