Resources, tips, and solutions we hope other devs will find when needed.
In a jQuery AJAX call, we set the the url to which the AJAX will pass the data. Here are three options. 1 > HTML action Use the action url coded into the HTML form we’re processing: 2 > Relative URL in the jQuery If the code is always going to live in the same […]
November 24, 2020
To submit a form by AJAX, ie using javascript with php to process a html form, use something like the code below. Note that we’re using the ‘on’ click event, so that even if the div that contains the trigger gets refreshed the function will still be bound. In this example, the form-handler file is […]
November 24, 2020
jQuery doesn’t have function for clearing forms, but there is a way. With this method you can clear form inputs with jQuery by re-loading the form. When the jQuery loads the content div into the container div, the file myform.php will essentially be refreshed and the form inputs will be cleared. This has been a […]
November 23, 2020