forum

Home / DeveloperSection / Forums / Loading image within ajax model poup

Loading image within ajax model poup

alexander sabato235011-Feb-2013

Hi Everyone!

I have using an AJAX Model popup. Before content loading I want to display loading image if content take time to loading.

My model popup code as below

<script type="text/javascript">
        $(document).ready(function () {
            $.ajaxSetup({ cache: false });
            $("#openDialog").live("click", function (e) {
                e.preventDefault();               
                var url = $(this).attr('href');
                $("#dialog-edit").dialog({
                    title: 'Download',
                    autoOpen: false,
                    resizable: false,
                    height: 250,
                    width: 400,
                    show: { effect: 'drop', direction: "up" },
                    modal: true,
                    draggable: true,
                    open: function (event, ui) {
                        $(this).load(url);
                    },
                    close: function (event, ui) {
                        $(this).dialog('close');
                    }
                });
                $("#dialog-edit").dialog('open');
                return false;
            });
</script>

Please help me!

Thanks in advance 


Updated on 11-Feb-2013

Can you answer this question?


Answer

1 Answers

Liked By