Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In your AJAX call you use global <code>event</code> object, which is not cross-browser and shouldn't be used (e.g. Firefox doesn't have it).</p> <p>Pass event in function call instead:</p> <pre><code>$('#remove_session').click(function(e){ e.preventDefault(); // rest of your code }); </code></pre> <p>If you do it that way, jQuery takes care about cross-browser normalization and proper behaviour.</p> <p>See also <a href="https://stackoverflow.com/questions/8838635/event-preventdefault-working-in-chrome-not-firefox-for-a-submit-button">this question</a> to learn more about difference between global <code>event</code> object and event passed into function.</p> <hr> <p><strong>If it still doesn't work</strong></p> <ul> <li>open developer tools in Chrome (F12)</li> <li>check in your console (<em>Console</em> tab) if there are any error reports after you click a button</li> <li>also, open <em>Network</em> tab and see if after clicking a button any request is made; what is response status?</li> <li>make sure your controller works with GET requests (as you don't specify request type, and <code>GET</code> is default)</li> <li>you may also try adding <code>dataType: "json"</code> to your AJAX request, but this shouldn't be a problem as Symfony's <code>JsonResponse</code> should already provide neccessary response headers </li> </ul> <hr> <p><strong>Check other places</strong></p> <ul> <li>error you posted says where the unexpected <code>:</code> is; investigate that line; is the code you have posted here the <code>whole</code> javascript that you have on your page?</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload