function AddTicket(eventid) { $.getJSON("/ajaxmini/gettickets/", { 'eventid': eventid }, function(e){ if (e.ok) { var tbl = document.getElementById('ticketTable'+eventid); var lastRow = tbl.rows.length; var iteration = lastRow+1; var row = tbl.insertRow(lastRow); var cellRight = row.insertCell(0); var el = document.createElement('select'); el.setAttribute('name', 'ticket'+ eventid + '-' + iteration); el.setAttribute('id', 'ticket'+ eventid + '-' + iteration); cellRight.appendChild(el); $('#ticket'+ eventid + '-' +iteration).append($(e.tickets)); var link = document.createElement('a'); link.setAttribute('href', '#'); link.setAttribute('name', 'ticket-link'+ eventid + '-' + iteration); link.setAttribute('id', 'ticket-link'+ eventid + '-' + iteration); link.setAttribute('class', 'ticketmix-delete'); link.setAttribute('onClick', "return RemoveTicket('"+ eventid + '-' + iteration +"');"); cellRight.appendChild(link); $('#ticket-link'+ eventid + '-' + iteration).append("x"); document.getElementById('ticket_number' + eventid).value = iteration; } else { //alert('bad'); } }); return false; } function RemoveTicket(eventid) { $("#ticket"+eventid).parent("td").remove(); return false; } function orderticket(eventid){ var ticket=[]; for(i=1;i<=$("#ticket_number"+ eventid).val();i++){ if ($("select[name='ticket"+ eventid + '-' +i+"'] option:selected").val() != undefined) { ticket.push($("select[name='ticket"+ eventid + '-' +i+"'] option:selected").val()); } } $.post("/ajaxmini/orderTicket/", { 'name': $("input[name='name"+ eventid +"']").val(), 'phone': $("input[name='phone"+ eventid +"']").val(), 'message': $("textarea[name='message"+ eventid +"']").val(), 'event_id':eventid, 'tickets': ticket }, function(e){ if (e.ok) { $("#tickerForm"+eventid).hide(); $("#sendOk"+eventid).show(); } else { //sender.html('Ошибка. Попробовать еще раз?'); } }, "json"); return false; }
Fatal error: Uncaught exception 'Exception' with message 'Headers already sent in /var/www/www-root/data/www/ikar62.ru/.htquota(95) : runtime-created function on line 191. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.' in /var/www/www-root/data/www/ikar62.ru/code/classes/FirePHP.class.php:1204 Stack trace: #0 /var/www/www-root/data/www/ikar62.ru/code/classes/FirePHP.class.php(757): FirePHP->newException('Headers already...') #1 /var/www/www-root/data/www/ikar62.ru/code/classes/FirePHP.class.php(446): FirePHP->fb(Object(ErrorException)) #2 [internal function]: FirePHP->errorHandler(2, 'Unknown: write ...', 'Unknown', 0, Array) #3 {main} thrown in /var/www/www-root/data/www/ikar62.ru/code/classes/FirePHP.class.php on line 1204