Change the iframe page from within it

0

Good morning I need a little help with the following:

I have a project where I use a page to show a fixed menu and just below is an iframe to show the pages that are specified with each button of the menu

Form of the iframe:

<h:form id="formVisualizador" style="height:92%">
    <iframe src="#{linkMenu.pagina}" name="option" style="height: 99%; width: 100%; min-width: 1055px; border:none; background-image: url('resources/img/filmreel1.png');" scrolling="auto"></iframe>
</h:form>

As you can see the iframe acquires the address of the page by means of a variable which is assigned in the menu buttons.

Now my problem is that I have to change the iframe page from the page that shows the iframe and the problem is that I can not update from within iframe and probe using update=":formVisualizador" and update="@all" , with the update="@all" shows no error but does not change pages, while with update=":formVisualizador" it marks error that it can not find the element.

    
asked by David Valado 29.06.2017 в 17:50
source

1 answer

0

You could on the page that shows in the iframe have an empty iframe so that when you want to update the page you hide everything and load the page in the iframe. not really reload the page just hide everything and show the page in the iframe that is inside the page initially shown in the iframe.

    
answered by 29.06.2017 / 18:03
source