Hello Sultan, I'm trying to make something similar. I have set of rows with edit, delete and I want to popup dialog with submit form for the specified user (row) data. I have something like this: http://groups.google.com/group/jquery-ui/browse_thread/thread/e339deed0880c9c2 This is not working as I want it to at the moment, but maybe using ajax I can simplify a bit and make it work. Can you help me out with this?
On Dec 10, 5:52 am, Sultan Imanhodjaev <sultan.imanhodj...@gmail.com> wrote: > Hello, seems there is problem which I had face once. I tackled this problem > in three steps > > 1. Load html data from the server > 2. Render this data ( make it proper) > 3. Bind event handlers to those three buttons > > $.ajax({ > > type : 'POST', > url : URI, > data : {DATA}, > success : function(data) { > > renderDataFn(data) > > } > }); > > function renderDataFn(data) { > > // Perform some actions on data proceed > > // Add data to the DOM stucture > $('#container').html(data); > > // For each button on a certain row bind event handlers > // with specific additional information e.g. each row has unique ID > // <tr id="uid_007"> > // <td class="edit">Edit</td> > // <td class="delete">Delete</td> > // </tr> > > $('#container t...@=edit]').each(function() { > > $(this).bind('click', function() { > > var uid = $(this).attr('id); > > // do some stuff > > } > }) > > // and the same to other controls > // notice it is better to refresh event handlers after > // each $('#dialog).dialog('close'); > // some time in some browsers all event handlers > // binded before are flushed > > } > > With best, > Sultan Imanhodjaev > -- > *(^_^)* -- You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to jquery...@googlegroups.com. To unsubscribe from this group, send email to jquery-ui+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.