Page 1 of 1

Open php page in a window

Posted: Wed Oct 10, 2018 11:24 pm
by brunogz
I would like to open a php page inside a window. How do I do?
Below, "page" represents the name of the file. In this case, "cadastro.php".

Code: Select all

function abreForm(caption, icone, pagina, altura, largura){
    var iDiv = document.getElementById('desktopArea');

    var innerDiv = document.createElement('div');
    innerDiv.className = 'p-2';
    innerDiv.setAttribute("data-role", "window");
    innerDiv.setAttribute("data-draggable", "true");
    innerDiv.setAttribute("data-width", largura);
    innerDiv.setAttribute("data-height", altura);
    innerDiv.setAttribute("data-title", caption);
    innerDiv.setAttribute("data-place", "top-center");
    [b]innerDiv.setAttribute("data-content", pagina);[/b]
    innerDiv.setAttribute("data-icon", "<img src='ico/" + icone + "'>");
    iDiv.appendChild(innerDiv);
    
}
Thanks.

Re: Open php page in a window

Posted: Wed Oct 10, 2018 11:45 pm
by brunogz
It looks like it worked, using frame.

Re: Open php page in a window

Posted: Fri Oct 12, 2018 1:04 pm
by olton
Use IFrame inside a window content