Guest User

Untitled

a guest
Sep 18th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. JQuery selecting trouble
  2. $('.submissionStatus').click(function () {
  3. var _ebId = $(this).next('.ebId').val();
  4. var _product = $(this).next('.product').val();
  5. var _applicantType = $(this).next('.applicantType').val();
  6. var _ssn = $(this).next('.ssn').val();
  7.  
  8. $.ajax({
  9. type: 'GET',
  10. data: { ebId: _ebId, product: _product, applicantType: _applicantType, ssn: _ssn },
  11. url: '@Url.Action("GetSeverityErrors", "AppListing")',
  12. success: function (data) {
  13. alert('Call success')
  14. $(this).next('.loaded').val(true);
  15. },
  16. error: function (xhr, status, error) {
  17. alert('An Error Occured.');
  18. }
  19. });
  20. });
  21.  
  22. <input type="hidden" class="ebId" value="@item.ElectedBenefitId" />
  23. <input type="hidden" class="product" value="@item.Product" />
  24. <input type="hidden" class="applicantType" value="@item.ApplicantType" />
  25. <input type="hidden" class="ssn" value="@item.Ssn" />
  26.  
  27. <td align="left">
  28. <a style="color:red;" class="submissionStatus" href="javascript: void(0)" title="SubmissionStatus">@item.SubmissionStatus.ToPrettyString()</a>
  29.  
  30. <input type="hidden" class="ebId" value="@item.ElectedBenefitId" />
  31. <input type="hidden" class="product" value="@item.Product" />
  32. <input type="hidden" class="applicantType" value="@item.ApplicantType" />
  33. <input type="hidden" class="ssn" value="@item.Ssn" />
  34. <input type="hidden" class="loaded" value="false" />
  35. </td>
  36.  
  37. var _ebId = $(this).siblings('input.ebId').val();
  38. var _product = $(this).siblings('input.product').val();
  39. var _applicantType = $(this).siblings('input.applicantType').val();
  40. var _ssn = $(this).siblings('input.ssn').val();
  41.  
  42. $('.submissionStatus').click(function () {
  43.  
  44. var storThis = this;
  45. var _ebId = $(storThis).next('.ebId').val();
  46. var _product = $(storThis).next('.product').val();
  47. var _applicantType = $(storThis).closest('.applicantType').val();
  48. var _ssn = $(storThis).closest('.ssn').val();
Add Comment
Please, Sign In to add comment