Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. $(document).ready(function () {
  2. if ($("#ProductName").val().toString() == "") {
  3. $("#pricingSectionDisplay").hide;
  4. $("#pricingSectionProductName").val("");
  5. }
  6. else {
  7. $("#pricingSectionDisplay").show;
  8. $("#pricingSectionProductName").val($("#ProductName").val());
  9. }
  10.  
  11.  
  12. if ($("#PackSize").val().toString() == "") {
  13. $("#pricingSectionDisplay").hide;
  14. $("#pricingSectionPackSize").val("");
  15. }
  16. else {
  17. $("#pricingSectionDisplay").show;
  18. $("#pricingSectionPackSize").val($("#PackSize").val());
  19. }
  20. });
  21.  
  22. function pricingSectionDisplay() {
  23. if ($("#ProductName").val().toString() == "") {
  24. $("#pricingSectionDisplay").hide;
  25. $("#pricingSectionProductName").val("");
  26. }
  27. else {
  28. $("#pricingSectionProductName").val($("#ProductName").val());
  29. }
  30.  
  31. if ($("#PackSize").val().toString() == "") {
  32. $("#pricingSectionDisplay").hide;
  33. $("#pricingSectionPackSize").val("");
  34. }
  35. else {
  36. $("#pricingSectionPackSize").val($(PackSize).val());
  37. }
  38. }
  39.  
  40. @Html.TextBoxFor(m => m.ProductName, new { @class = "form-control", @id = "ProductName", onblur = "pricingSectionDisplay()" })
  41.  
  42. @Html.TextBoxFor(m => m.PackSize, new { @class = "form-control", @id = "PackSize", onblur = "pricingSectionDisplay()" })
  43.  
  44. $("#pricingSectionDisplay").hide;
  45.  
  46. $("#pricingSectionDisplay").hide();
  47.  
  48. @Html.TextBoxFor(m => m.ProductName,
  49. new { @class = "form-control", id = "ProductName",
  50. onblur = "pricingSectionDisplay()" })
  51.  
  52. @Html.TextBoxFor(m => m.ProductName,
  53. new { @id = "ProductName",
  54. onblur = "pricingSectionDisplay()" })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement