Iframe in Codeigniter

How to transfer data from the controller to the viewing page loaded via iframe in CodeIgniter?

+4
source share
3 answers

Your iframe src must be a controller function, just like for access to a separate page

+1
source

You can also use postmessage.js to control the link between iframes and host pages. There are both the original jquery version and the standalone version.

+1
source

mmm I think what you should do if you want to use iframe is to refresh the page via ajax by sending the values ​​through the url.

Upstairs, if you use ajax for updating, you should also display your information with this method, not IFRAME.

In any case, you can use jquery to update your iframe.

you can access the iframe as follows:

$ (window.frames ['my-IFrame']. Document)

If you could implement a complete jquery solution instead of this iframe method, this will simplify your life.

0
source

Source: https://habr.com/ru/post/1336442/


All Articles