adding more no of records using jquery

I have a autocomplete textbox, in that textbox am getting employee names. If I click that particular employee name, that particular employee's details like photo,name,id,contact no these kind of details should be added as a box container(just same as the tags box in our stackoverflow), like this how many employee's name em clicking on, that much of records should be added below that textbox, how can I do this, and which tool I have to use for this, can anyone help me function searchEmployees() { $("#txtEmployee").autocomplete({ source: function (request, response) { $.ajax({ type: "POST", url: "/DataService.asmx/SearchEmployees", contentType: "application/json; charset=utf-8", data: "{'searchTerm' : '" + $("#txtEmployee").val() + "'}", dataType: "json", success: function (data) { var s = jQuery.parseJSON(data.d); var i = 0; var css = ""; if (s != null) { response($.map(s, function (item) { i++; if (i == s.length) { css = "autocompletetablenoborder"; } else { css = "autocompletetable"; } return { label: "
" + item.Name + " ( " + item.USN + " )
" + item.Email + " | " + item.Mobile + "
", name: item.Name } })); } else { return null; } }, error: function (req, status, error) { alert("ERROR:" + error.toString() + " " + status + " " + req); } }); }, minLength: 1, select: function (event, ui) { $("#Employee").val(ui.item.name); return false; } }); } here as you can see am trying to add the employee name(actually I need to display employee image,contact no, id...but just for trial am trying to bind name only) in the div, after we select a particular employee from the autocomplete list, but its not working, can anyone find out the issue
we can help you if you post your attempts

以上就是adding more no of records using jquery的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏