How to use dialog-form jquery for list of buttons in javascript -


i have list in javascript, i'm displaying in table format using loop along edit button each row. when click on edit button need open dialog pop-up using jquery dialog. in code, when click on edit button i'm neither getting error nor pop displaying. might issue. below code.

$.ajax({              url : '/edsweb/getedslogdata',             type : 'get',             datatype : 'json',             data :  {dc: dc, mdc:mdc, group:group},             success : function(map) {                 console.log(map);              var htmlstr = "<table border='1'>";                 htmlstr += "<tr> <td>user name </td> <td> user group </td> <td> remarks </td>";                 htmlstr += " <td> edit user remarks</td></tr>";                 (var = 0; < map.length; i++) {                      htmlstr += "<tr><td>";                      htmlstr +=  map[i].username;                      htmlstr += "</td><td>";                      htmlstr +=  map[i].usergroup;                      htmlstr += "</td><td>";                      htmlstr +=  map[i].userremarks;                      htmlstr += "</td><td>";                      htmlstr += " <button id='editremarkid"+i+"'> edit </button>";                      htmlstr += "</td></tr>";                 }                 htmlstr += "</table>"                 $out = $('#em_ordering');                 $out.html(htmlstr);                    },             error : function() {                 alert("error occured!!!");             },          }); 

dialog script code:

$(function() {   $( "#dialog-form" ).dialog({ autoopen: false, height: 300, width: 350, modal: true, buttons: { "update remarks": function() {  }, cancel: function() { $( ).dialog( "close" ); } },  }); $( "#editremarkid" ) .button() .click(function() { $( "#dialog-form" ).dialog( "open" ); }); }); 

i have done small changes in code,now working.just @ http://jsfiddle.net/nzleu/ need add these 4 files jquery dialog

<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.9.1.js"></script> <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css"> 

if want check link jquerydialogue


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -