I am new to BootstrapDialog but I have added required Javascript and Css references. Moreover I can able to execute that dialog through sample code given BootstrapDialog.alert('Hi Apple!', function ()...
But I want to use this with MVC 5 ajax request. I have added the piece of Remote call and that is something like below...
BootstrapDialog.show({ size: BootstrapDialog.SIZE_WIDE, message: function (dialog) { var $message = $('#form-dialog-content'); var pageToLoad = dialog.getData('pageToLoad'); $message.load(pageToLoad); return $message; }, data: { 'pageToLoad': url } });
from HTML Side, I have only two div like
`
</div>`
when I execute this I have grid and in that, I have cell with Hyperlink which call this javascript function. It works well when first time I click that cell link.
It gives me nice model popup. I can also close that using top crossbar.
But when I click the same link again, I am not getting that call back to server-side.
Just to investigate, I added alert inside function (dialog) and I am getting alert continuously but still it didn't call to server after first-time click.
If I replace this code simple with Hi Apple, It gives me dialog everytime I press that link. so, that way I validated that this something inside that Javascript snippet which fails second time onwards.
Hi Team,
I am new to BootstrapDialog but I have added required Javascript and Css references. Moreover I can able to execute that dialog through sample code given BootstrapDialog.alert('Hi Apple!', function ()...
But I want to use this with MVC 5 ajax request. I have added the piece of Remote call and that is something like below...
BootstrapDialog.show({ size: BootstrapDialog.SIZE_WIDE, message: function (dialog) { var $message = $('#form-dialog-content'); var pageToLoad = dialog.getData('pageToLoad'); $message.load(pageToLoad); return $message; }, data: { 'pageToLoad': url } });
from HTML Side, I have only two div like
`
when I execute this I have grid and in that, I have cell with Hyperlink which call this javascript function. It works well when first time I click that cell link. It gives me nice model popup. I can also close that using top crossbar.
But when I click the same link again, I am not getting that call back to server-side. Just to investigate, I added alert inside function (dialog) and I am getting alert continuously but still it didn't call to server after first-time click.
If I replace this code simple with Hi Apple, It gives me dialog everytime I press that link. so, that way I validated that this something inside that Javascript snippet which fails second time onwards.
any idea or suggestion ?
Hello,
I think you can change the line
To
It's not working inside a ajax call in web api but jquery alert is working. Please advise. Thanks.
$.ajax({ url: masterUrl + "/controllername/methodname?resultData=" + sendData, type: "POST", data: JSON.stringify(sendData), async: false, datatype: 'json', contentType: "application/json;charset=utf8", success: function (getData) {