Site Builder Studio

SITEBUILDERSTUDIO

Developers Blog

Resources, tips, and solutions we hope other devs will find when needed.

Setting Form Action in jQuery AJAX

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

Form submission with AJAX

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

Clear form inputs with jQuery

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