如何使用Ajax Jquery显示数据从数据库到Textbox [英] How to show the data From database to Textbox using Ajax Jquery

查看:74
本文介绍了如何使用Ajax Jquery显示数据从数据库到Textbox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的团队,

我陷入了Ajax jquery。

我的代码如下:





Dear Team,
I got stuck in Ajax jquery.
I have the Code as follows:


<tr>
<td>
                     <label>
                         DEO ID :
                     </label>
                 </td>
                 <td>
                     <select id="deoIdSelect" class="combo100" name="dataEntryOperatorID">
                         <option value=""></option>
                     </select>
                 </td>
             </tr>



我想要展示Combobox中的ID。



我在.aspx页面中的代码如下

< script>


I want to show the ID in Combobox .

I have the code in .aspx page as follow
<script>

var DisplayDEOIDList;

       $(function () {
           try {
               GetDisplayDEOID();
               $.ajaxSetup({
                   async: false
               });

           }
           catch (exception) {
               manageOverlay(false);
               alert(exception);
           }
       });




function GetDisplayDEOID() {
            debugger;
            $.ajax({
                url: 'QCAllocation.aspx/GetDisplayDEOID',
                type: 'POST',
                //                data: { DEOIDDropDown: deoIDDropDownValue },
                contentType: 'application/json; charset=utf-8',
                dataType: "json",
                success: function (result) {
                    debugger;
                    if (result.d != '') {
                        if (result.d != '' && result.d != null) {
                            DisplayDEOIDList = JSON.parse(result.d);
                            getDEOID(DisplayDEOIDList);

                        }
                        manageOverlay(false);
                    }

                },
                error: function (error) {
                    manageOverlay(false);
                    alert(error.responseText);
                },
                async: false
            })
        };







function getDEOID(DisplayDEOIDList) {
           for (var i = 0; i < DisplayDEOIDList.length; i++) {
               drawRow(DisplayDEOIDList[i]);
           }

       }





< / script>



我的问题是我想在Combobox中显示我不知道如何显示它的数据...





请指导我,因为我是Ajax Jquery的新手。

谢谢

Harshal



</script>

My problem is i want to show that data in Combobox which i dont know how to show it ...


Please guide me as i am new in Ajax Jquery.
Thanks
Harshal

推荐答案

(function(){
try {
GetDisplayDEOID();
(function () { try { GetDisplayDEOID();


.ajaxSetup({
async:false
});

}
catch(例外){
manageOverlay(false);
alert(例外);
}
});
.ajaxSetup({ async: false }); } catch (exception) { manageOverlay(false); alert(exception); } });




function GetDisplayDEOID() {
            debugger;


.ajax( {
url:'QCAllocation.aspx / GetDisplayDEOID',
类型:'POST',
//数据:{DEOIDDropDown:deoIDDropDownValue},
contentType:'application / json; charset = utf-8',
dataType:json,
成功:函数(结果){
调试器;
if(result.d!=''){
if(result.d!=''&& result.d!= null){
DisplayDEOIDList = JSON.parse(result.d);
getDEOID(DisplayDEOIDList);

}
manageOverlay(false);
}

},
错误:函数(错误){
mana geOverlay(false);
alert(error.responseText);
},
async:false
})
};
.ajax({ url: 'QCAllocation.aspx/GetDisplayDEOID', type: 'POST', // data: { DEOIDDropDown: deoIDDropDownValue }, contentType: 'application/json; charset=utf-8', dataType: "json", success: function (result) { debugger; if (result.d != '') { if (result.d != '' && result.d != null) { DisplayDEOIDList = JSON.parse(result.d); getDEOID(DisplayDEOIDList); } manageOverlay(false); } }, error: function (error) { manageOverlay(false); alert(error.responseText); }, async: false }) };







function getDEOID(DisplayDEOIDList) {
           for (var i = 0; i < DisplayDEOIDList.length; i++) {
               drawRow(DisplayDEOIDList[i]);
           }

       }





< / script>



我的问题是我想在Combobox中显示我不知道如何显示它的数据...





请指导我,因为我是Ajax Jquery的新手。

谢谢

Harshal



</script>

My problem is i want to show that data in Combobox which i dont know how to show it ...


Please guide me as i am new in Ajax Jquery.
Thanks
Harshal


这篇关于如何使用Ajax Jquery显示数据从数据库到Textbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆