Hello I am building an admin dashboard for my product. I am having trouble calling a url other than youtube in a window.
I want my webpage to load immediately the create...() function is called.
function createWindowFBPage(){
Desktop.createWindow({
width: 500,
icon: "<span class='mif-facebook'></span>",
title: "Facebook",
content: "",
onShow: function(_dialog){
$.ajax({
url: "https://www.facebook.com/",
dataType: "html",
success: function(result){
var html = result;
$.Dialog.content(html);
}
});
}
clsContent: "bg-dark"
});
}
Load Webpage in a window or dialog
- olton
- Site Admin
- Posts: 170
- Joined: Mon Apr 09, 2018 6:19 pm
- Location: Kiev, Ukraine
- Status: Offline
At this time dialog has a minor problem with event onShow. But you can use next method:
https://sandbox.org.ua/olton/code/j1Rbaevbd8
P.S.
To load facebook page, you must use an iframe, because of you receive X-Cors error otherwise.
P.S.2
https://metroui.org.ua/dialog.html# Read the dialog docs. You use syntax from Metro UI 3, but in Metro 4 dialog component was rewritten.
https://sandbox.org.ua/olton/code/j1Rbaevbd8
P.S.
To load facebook page, you must use an iframe, because of you receive X-Cors error otherwise.
P.S.2
https://metroui.org.ua/dialog.html# Read the dialog docs. You use syntax from Metro UI 3, but in Metro 4 dialog component was rewritten.
- olton
- Site Admin
- Posts: 170
- Joined: Mon Apr 09, 2018 6:19 pm
- Location: Kiev, Ukraine
- Status: Offline
Hi! I fix onShow event in the develeop branch 4.2.32
https://sandbox.org.ua/olton/code/yExZ0D9ZP2
https://sandbox.org.ua/olton/code/yExZ0D9ZP2