We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dialog: Content is always empty. No "GET" message send to the server

I'm trying to change the content url before open the dialog.

However it always render empty, because changing the contentUrl doesn't do any post or get to the server:
@Html.EJ().Dialog("modalFichaEquipo").Width(1000).Height(750).EnableModal(true).ShowOnInit(false).Title("Ficha Equipo").EnableResize(true)

<script type="text/javascript">
    function openModalFichaEquipo(id) {
        var url = '@(System.Configuration.ConfigurationManager.AppSettings["urlFichaEquipo"])' + id;
        url = url.replace("&amp;", "&");

        var dialogObj = $("#modalFichaEquipo").ejDialog({
            contentType: "ajax",

            contentUrl: url
        });

        //$('#modalFichaEquipo').html("");
        //dialogObj.option("contentUrl", url);

        $("#modalFichaEquipo").ejDialog("open");
        //dialogObj.open();
    }
</script>

1 Reply

AP Arun Palaniyandi Syncfusion Team April 18, 2016 01:43 PM UTC

Hi Jaime,

Thanks for contacting syncfusion support.

Query:” I'm trying to change the content url before open the dialog. However it always render empty, because changing the contentUrl doesn't do any post or get to the server “

We have tried to reproduce the reported scenario and we are able to reproduce the issue in our end. This issue will be fixed internally and will be included in the upcoming Volume 1 SP1 release.

Hence we suggest you to use the following workaround solution for this issue.


Solution :

Load the contentUrl property first before the contentType property, as mentioned in the below code snippet.


<script>

var dialogObj = $("#modalFichaEquipo").ejDialog({

            contentUrl: url,

            contentType: "ajax"


        });

<script>


We have also prepared a sample by using the shared codes. Please find the sample below for your reference.
http://www.syncfusion.com/downloads/support/forum/123735/ze/MVCsampledialog1238531388


Please let us know if you have any queries,

Regards,
Arun P


Loader.
Live Chat Icon For mobile
Up arrow icon