Guest User

Untitled

a guest
Jun 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. $("#creativeSave").click(function () {
  2. var maxPreambleCount = $("#preambleCharacterCount");
  3. var maxTextCount = $("#textCharacterCount");
  4. if ($("#text").val() == '' || $("#preamble").val() == '') {
  5. $("#errorMsg").show().text('Please enter text into the above fields');
  6. return false;
  7. } else {
  8. if (maxPreambleCount.hasClass("nomoreChars") || maxTextCount.hasClass("nomoreChars")) {
  9. $("#errorMsg").show().text('Make your remaining characters do not exceed 0');
  10. return false;
  11. } else {
  12. $("#errorMsg").hide().text('');
  13. return true;
  14. }
  15. }
  16. if ($("#responseCode").val() == 0) {
  17. alert("what");
  18. }
  19. });
Add Comment
Please, Sign In to add comment