Home>
$ ('Document'). Ready (Function ()
{
$ ('# Auth'). AjaxForm ({
Target: '#PreView',
SUCCESS: FUNCTION () {
$ ('# Auth'). Resetform ();
}
});
});
I use
jQuery.form
To send form. Next I get the answer, but if the answer for example
'Noaccess'
, I will restart the page, and if there is no such answer, it does not reboot anything. How to implement in this case?
-
Answer # 1
-
Answer # 2
Use the function parameter
Callback
jQuery (Function ($) { $ ('# Auth'). AjaxForm ({ Target: '#PreView', SUCCESS: FUNCTION (DATA) { if (data== 'noauth') $ ('# auth'). resetform (); } }); });
Related questions
- MySQL Partitioning for transaction data
- MySQL and AUTO_INCREMENT columns in multiple-column index for InnoDB tables: support status?
- mysql : SQL query working with 8.0 but not working with 5.7
- MySQL Configuration. Query Doesnt Get Returned Result (Datagrip, Dbeaver, PHP). Something Times Out.
- Row Size Limits in MySQL W.R.T to Text and Blob Columns
- Optimizing A Distinct On a Parent Table in A Multi-Level Join in MySQL 5
- How to Speed Up Foreign Key Creation In MySQL for Large Tables?
- The subquery in MySQL does not work in
- mysql : Duplicate Key On Delete and Update Of Unique Key
Use the function parameter
Callback