Advertisement
Guest User

Untitled

a guest
Apr 21st, 2014
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. <script type="text/javascript">
  2. <%int n=(Integer)request.getAttribute("n");%>
  3.  
  4. $(document).ready(function(){
  5.  
  6. var A=<%=n%>;
  7. $('input[name^=txtDynamic_]').keyup(function () {
  8. if ($(this).val() > A) {
  9. //alert("inside if");
  10. $(this).next().html('Greater than Total shares');
  11. $("#flagvalue").val("invalid");
  12. }
  13. else{
  14. $(this).next().html('');
  15. $("#flagvalue").val("valid");
  16. }
  17. });
  18.  
  19. if($("#flagvalue").val()=="invalid")
  20. {
  21. $("#submitbutton").prop('disabled', true);
  22. }
  23. else{
  24. $("#submitbutton").prop('disabled', false);
  25. }
  26. });
  27.  
  28.  
  29. </script>
  30.  
  31. <FORM METHOD=POST ACTION="stegnographyonshares" enctype="multipart/form-data">
  32.  
  33. <c:forEach var="i" begin="1" end="${myK}">
  34. Enter The ${i} share number: <input type="textbox" name="txtDynamic_${i}"/><span></span>
  35.  
  36. <br />
  37. <br>
  38. </br>
  39. </c:forEach>
  40. <br></br>
  41. <INPUT TYPE="file" NAME="file" value="file">
  42. <br></br>
  43.  
  44. <input type="submit" value="SAVE" id="submitbutton">
  45. <input type="hidden" id="flagvalue"/>
  46. </form>
  47.  
  48. $(document).ready(function(){
  49. var A = <%=(Integer)request.getAttribute("n")%>
  50. $('input[name^=txtDynamic_]').keyup(function () {
  51. if ($(this).val() > A) {
  52. $(this).next().html('Greater than Total shares');
  53. flag=1;
  54. }
  55. else{
  56. $(this).next().html('');
  57. }
  58. });
  59. });
  60.  
  61. $(document).ready(function(){
  62.  
  63. //Put your js code here
  64. });
  65.  
  66. <script>
  67. $(document).ready(function(){
  68.  
  69. <%int n=(Integer)request.getAttribute("n");%>
  70. var A=<%=n%>;
  71. $('input[name^=txtDynamic_]').keyup(function () {
  72. if ($(this).val() > A) {
  73. $(this).next().html('Greater than Total shares');
  74. flag=1;
  75. }
  76. else{
  77. $(this).next().html('');
  78. }
  79. });
  80. });
  81. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement