-
- Notifications
You must be signed in to change notification settings - Fork 221
Closed
Description
I have tried to initialise ajax call by http://prototypejs.org/ prototype 1.7.3 library simply by modifying this code in /tracy-2.4.0/examples/ajax.php
I can see ajax calls in Chrome Console, but Tracy is not capturing/displaying them. Could you help me to find the problem?
<?php require __DIR__ . '/../src/tracy.php'; use Tracy\Debugger; session_start(); // session is required for this functionality Debugger::enable(Debugger::DETECT, __DIR__ . '/log'); if (isset($_SERVER['HTTP_X_REQUESTED_WITH'])) { // AJAX request Debugger::barDump('AJAX request'); if (!empty($_GET['error'])) { this_is_fatal_error(); } $data = [rand(), rand(), rand()]; header('Content-Type: application/json'); header('Cache-Control: no-cache'); echo json_encode($data); exit; } Debugger::barDump('classic request'); ?> <!DOCTYPE html><html class=arrow><link rel="stylesheet" href="assets/style.css"> <h1>Tracy: AJAX demo</h1> <p> <button id="prototype" onclick="prototype_ajax()">AJAX PROTOTYPE request</button> <span id=result>see Debug Bar in the bottom right corner</span> </p> <p> <button class=error>Request with error</button> use ESC to toggle BlueScreen </p> <script src="prototype.1.7.3.js"></script> <script> function prototype_ajax() { new Ajax.Request('ajax.php',{ method: 'post', onSuccess: function (transport) { var r = transport.responseText.evalJSON(); console.log(r); } }); } </script> Metadata
Metadata
Assignees
Labels
No labels