Search code examples
zend-frameworkfooter

How can i insert iframe in footer Layout Zend without refresh this footer?


I am building an application using Zend Framework and i need insert one iframe in footer this application but, when i press F5 or click link or button, all page refresh even iframe. The layout zend is called everytime when i dispatcher an event to server, ready, the iframe too. (My iframe is in the foorter.phtml, ready, it called together layout).

Someone have an some idea how to resolve this question?

tks


Solution

  • You cannot refresh the whole page except for an iframe on the page. When you ask a browser to refresh a page, it will refresh the whole page, there's no way to do it any differently.

    To do what you seem to want to do, without using Javascript/AJAX, you'd have to use two frames. One for the top part of your website, and one for your footer. Here is an introduction to frames and how they work (iframes are similar, they are just "internal frames"): http://www.w3.org/TR/html4/present/frames.html

    Please, however, note that using frames/iframes is not a practice I personally encourage. You should ask yourself why you are trying to do this. If it's to reload only a certain part of the page, then you should probably check into Javascript/AJAX alternatives.