Open html web resource as dialog on command button click model driven app
Use below code.
function openWR()
{
var pageInput = {
pageType: "webresource",
webresourceName: "new_sample_webresource.htm"
};
var navigationOptions = {
target: 2,
width: 500, // value specified in pixel
height: 400, // value specified in pixel
position: 1
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
function success() {
// Run code on success
},
function error() {
// Handle errors
}
);
}