GedMarc / bootstrap4-dialog

bootstrap4 compatible modal dialog based on nakupanda.github.io/bootstrap3-dialog
https://nakupanda.github.io/bootstrap3-dialog/
65 stars 31 forks source link

On load remote page, not execute javascript #21

Closed hugff closed 4 years ago

hugff commented 4 years ago

Hi,

We are loading the modal's content using:

message: $('<div></div>').load('Sapp?/crmcustomer.newcrminput');

In load page, to try it, we have a simple javascript code like this one : `

`

When we execute "BootstrapDialog.show" the dialog appears but this simple javascript doesn't work.

Thanks for this amazing tool.

DimchoLakov commented 4 years ago

Hi @hugff,

I encountered the same problem. Please take a look at this --> #15.

GedMarc commented 4 years ago

Is there any chance of attaching a quick example? Mostly these items are https:// vs http:// calling, especially when crossing domain

Can you try :-

BootstrapDialog.show({
    message: $('<div></div>').load('remote.html'),
     onshown: function(){alert('displayed');}
});
GedMarc commented 4 years ago
BootstrapDialog.show({
    message: $('<div id="popupContent"></div>'),
    onshown: function () {
        $("#popupContent").load('remote.html')
    }
})
hugff commented 4 years ago

Ok Thanks, This will be a good solution.