1. Click Add Data in a pop-up box (Modal) to pop up a second window (Modal). After the data is created and saved in the second window (Modal), how to refresh the data in the first MODAL? The code is as follows:
The second pop-up box will pop up after clicking Add
The code is as follows:
Pop up a new page
2. Save after adding data
3. How to refresh the first Modal data
The problem has been solved, the method of calling the parent page directly in ajax.
Since we all use ajax, why didn’t the first Modal use ajax to process data?
If the data in the first Modal is obtained through ajax, then after the second window is added successfully, you should execute ajax in the first window again to obtain the data again. If you use frameworks such as ng and vue, you can directly push the data added by the second Modal to the array of the first Modal. Synchronous refresh can be achieved