Ruby on Rails
Wednesday, June 24, 2015
Do you mean that when you click this link it does not show the correct
one? If so then have a look at the html the for the link in the
browser (View Source, or something similar in the browser to see it,
Ctrl+U in Firefox) to see if it is correct and look in development.log
to see what parameters are passed for it when you click it.
Colin
Hello colin,
I saw the View Source option as well as inspect element in the firefox. Both of them contain corresponding values of their respective rows' in MODAL. What would
be the problem to show the values as it is ? Why it is showing the same values for other show button when clicked, while different MODAL contains different values?
Here is the "View source" of two MODAL. I've pasted first and second row values and deleted some rows of code such as styles etc. so ignore the number of opening and closing tags like <div> etc. Please tell me if any other information is needed.
Row 1
<td>1</td> <td>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">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 rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/af158cea-ccd3-47ee-b73f-1c3e6a247ab6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment