javascript - About modal window, close the current window and refresh the previous window
迷茫
迷茫 2017-05-19 10:16:47
0
2
599

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

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
世界只因有你

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template