Quick snippet for updating control with SPA

Here are two approaches.

Assuming the following HTML code

Normal Approach

This code will call the module ‘quote-status-form‘ on the click and update the ‘<section>‘ tag with the result of the Ajax request.

Using JavaScript

Similar behaviour can be achieved using the code shown below, The important thing to note is how the ‘o’ object is created.

 

Updated on Jul 01, 2024