var mycallback; // nacita data o uzivateli $('#userdata').load('/userdata.php', function(userdata) { //var str = $('#userdata').html(); //var zac= str.indexOf(">") + 1; //var kon= str.lastIndexOf(" 3 ? 3 : data.acquisitionsNT.length; text ="

Nejlevnější jízdenky

"; for (var i = 0; i od " + price + " Kč" + from + " – " + to + ""; } l2 = data.acquisitionsInt.length > 2 ? 2 : data.acquisitionsInt.length; for (var j = 0; j od " + price + " Kč" + from + " – " + to + ""; } //alert (text); document.getElementById('low-cost-ticket').innerHTML = text; }, error: function(error, status, message){ alert(message); } }); });