Open php page in a window

Get help with using Metro 4 components
Post Reply
brunogz
Posts: 12
Joined: Wed Oct 10, 2018 11:20 pm
Status: Offline

Open php page in a window

Post by brunogz » Wed Oct 10, 2018 11:24 pm

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.

brunogz
Posts: 12
Joined: Wed Oct 10, 2018 11:20 pm
Status: Offline

Post by brunogz » Wed Oct 10, 2018 11:45 pm

It looks like it worked, using frame.

User avatar
olton
Site Admin
Posts: 114
Joined: Mon Apr 09, 2018 6:19 pm
Location: Kiev, Ukraine
Status: Offline

Post by olton » Fri Oct 12, 2018 1:04 pm

Use IFrame inside a window content

Post Reply