Guys do you know how to call external file for insert to dialog with Metro ui framework. I have followed docs here: http://metroui.org.ua/dialog.html But its not showing how to call external file like .html or .php. Please can you help me advice or solution.thanks
Asked
Active
Viewed 672 times
-1
-
You can fetch the content with an AJAX call in `onShow` and set the returned data as content for dialog. – anpsmn Apr 02 '15 at 06:06
-
@anpsmn can you give link an example? – Ilham Apr 02 '15 at 06:12
1 Answers
1
You can make an ajax call and set the result as content for the dialog on onShow
event. [source]
$("#createFlatWindow").on('click', function(){
$.Dialog({
overlay: true,
shadow: true,
flat: true,
icon: '<img src="images/excel2013icon.png">',
title: 'Flat window',
content: '',
onShow: function(_dialog){
$.ajax({
url: "test.php",
dataType: "html",
success: function(result){
var html = result;
$.Dialog.content(html);
}
});
}
});
});

anpsmn
- 7,217
- 2
- 28
- 44
-
guys its great the external page successfull load, but why got error?the dialog cannot be closed.please help me im already confused – Ilham Apr 02 '15 at 06:37
-