// JavaScript Document function rdOfertas_includes() { if (typeof(jQuery) == 'undefined') rdOfertas_includeLibreria('https://ruralesdata.com/js/jquery-1.11.1.min.js','js',function(){jQuery.noConflict();}); } function rdOfertas_includeLibreria(ruta,tipo,callbackFunc){ var head = document.getElementsByTagName('head')[0]; if(tipo=='js') { var se1 = document.createElement('script'); se1.src = ruta; if(callbackFunc!=null) se1.onload=callbackFunc; head.appendChild(se1); } if(tipo=='css') { var cssNode_jquery = document.createElement('link'); cssNode_jquery.type = 'text/css'; cssNode_jquery.rel = 'stylesheet'; cssNode_jquery.href = ruta; cssNode_jquery.media = 'screen'; head.appendChild(cssNode_jquery); } } function rdOfertas_show() { rdOfertas_includeLibreria('https://ruralesdata.com/api/ofertasw/show.css','css',null); document.write("
"); jQuery.ajax( "https://ruralesdata.com/api/ofertasw/show.php", { type: 'POST', data : {num:0, lg:'es', id:'130'}} ) .done(function(html) { jQuery('#rdOfertas').html(html); }) .fail(function() { jQuery('#rdOfertas').html("Error cargando datos"); }) } rdOfertas_includes(); rdOfertas_show();