Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Instead of using $.getJSON, you can use $.ajax and set the cache option to false. I think that sound fix the issue.</p> <pre><code>$("#loginForm").submit(function(e) { var form = $(this); $.ajax({ type: 'GET', url: "cfcs/security.cfc?method=processLogin&amp;ajax=1&amp;returnformat=JSON&amp;queryformat=column&amp;" + form.serialize(), dataType: "json", cache: false, success: function(json) { // everything is ok. (server returned true) if (json === true) { // close the overlay triggers.eq(0).overlay().close(); $("#loginMenu").html("&lt;a href='logout.cfm'&gt;Log out&lt;/a&gt;"); // server-side validation failed. use invalidate() to show errors } else if (json === "More than five") { var tempString tempString = "&lt;h2&gt;Too many failed logins &lt;/h2&gt;" $("#loginMsg").html(tempString); triggers.eq(0).overlay().close(); $("#toomanylogins").overlay().load(); } else { var tempString tempString = "&lt;h2&gt;" + json + " failed logins&lt;/h2&gt;" $("#loginMsg").html(tempString); } } }); // prevent default form submission logic e.preventDefault(); }); // initialize validator and add a custom form submission logic $("#signupForm").validator().submit(function(e) { var form = $(this); // client-side validation OK. if (!e.isDefaultPrevented()) { // submit with AJAX $.ajax({ type: 'GET', url: "cfcs/security.cfc?method=processSignup&amp;returnformat=JSON&amp;queryformat=column&amp;" + form.serialize(), dataType: "json", cache: false, success: function(json) { // everything is ok. (server returned true) if (json === true) { // close the overlay triggers.eq(1).overlay().close(); $("#loginMenu").html("&lt;a href='logout.cfm'&gt;Log out&lt;/a&gt;"); // server-side validation failed. use invalidate() to show errors } else { form.data("validator").invalidate(json); } } }); // prevent default form submission logic e.preventDefault(); } }); </code></pre>
 

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