Previous Entry Share Next Entry
Вызов asp.net веб сервисов с помощью jquery
Панда WTF !?
ect0plasm wrote in dotnetcookbook

Все просто.


function
SetSimpleTextEditor2(pageName, id) {

    $.ajax({

        type: "POST",

        url: "WSMega.asmx/GetSimpleText",

        data: "{'pageName':'" + pageName + "','id':'" + id + "'}",

        contentType: "application/json; charset=utf-8",

        dataType: "json",

        success: function (msg) {

            if (null != msg.d.Name)

                $('#ctl00_ucSimpleTextEditor_txtName').val(msg.d.Name);

 

            if (null != msg.d.Keywords)

                $('#ctl00_ucSimpleTextEditor_txtKeywords').val(msg.d.Keywords);

 

            if (null != msg.d.Description)

                $('#ctl00_ucSimpleTextEditor_txtDescription').val(msg.d.Description);

 

            if (null != msg.d.Body)

                CKEDITOR.instances.ctl00_ucSimpleTextEditor_ckeText.setData(msg.d.Body);

 

            $('#ctl00_ucSimpleTextEditor_hfElementID').val(id);

            $('#SimpleTextEditor').fadeIn('slow');

        }

    });

}

 


?

Log in