On Thursday, June 25, 2015, Padmahas Bn <[email protected]> wrote: > > <td><!-- Modal --> > > <div class="modal fade" id="myModal" tabindex="-1" role="dialog" > aria-labelledby="myModalLabel" aria-hidden="true"> > > This is your problem: all of your modal divs have the same id and it would seem that the javascript triggering the modal identifies the div by id. Ids are supposed to be unique, so it just uses the first div it finds with that id. You could make the myModal id change for each instance (and obviously change the link to) or perhaps whatever you are using for your modals supports more complex expressions for data-target
Fred > <button type="button" class="close" data-dismiss="modal" > aria-label="Close"><span aria-hidden="true">×</span></button> <h4 > class="modal-title" id="myModalLabel">1</h4> </div> <div > class="modal-body"> <div class="table-responsive"> > <table class="table table-striped table-show"> <tr> <th> > <strong>Designation code:</strong> </th> > <td> 1 > *#Value should be changed here in the next row* > > </td> </tr> <tr> <th> > <strong>Designation description:</strong> > </th> <td> Commissioner > *#Value should be changed here in the next row* > > </td> </tr> </table> <div > class="modal-footer"> <button type="button" class="btn btn-default" > data-dismiss="modal">Close</button> </div> </div></td> > <td><a data-target="#myModal" data-toggle="modal" class="btn btn-default" > href="/designation_dicts/1">Show</a></td> > > > <tr> > > Row 2 > > > <td>2</td> > <td>Assistant Commissioner</td> > <td><!-- Modal --> > > <div class="modal fade" id="myModal" tabindex="-1" role="dialog" > aria-labelledby="myModalLabel" aria-hidden="true"> > <button type="button" class="close" data-dismiss="modal" > aria-label="Close"><span aria-hidden="true">×</span></button> > <h4 class="modal-title" id="myModalLabel">2</h4> </div> <div > class="modal-body"> <div class="table-responsive"> > <table class="table table-striped table-show"> <tr> <th> > <strong>Designation code:</strong> </th> > <td> 2 > *#Value changed here* > </td> </tr> <tr> <th> > <strong>Designation description:</strong> > </th> <td> Assistant Commissioner > *#Value changed here* > </td> </tr> </table> </div> > </div> <div class="modal-footer"> <button > type="button" class="btn btn-default" data-dismiss="modal">Close</button> > </div> </td> > > > Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','rubyonrails-talk%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/af158cea-ccd3-47ee-b73f-1c3e6a247ab6%40googlegroups.com > <https://groups.google.com/d/msgid/rubyonrails-talk/af158cea-ccd3-47ee-b73f-1c3e6a247ab6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CABp077Urh1QdVyq4PuvcsHPUB-Xpb2%2BA0XfKOMZXickLsWfqDA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

