Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.33 KB | None | 0 0
  1. function changeTitle(project_id, project_title, url1) {
  2.  
  3. if (project_title != null) {
  4.  
  5. $.ajax({
  6. type: "POST",
  7. url: "/change_title",
  8. data: {
  9. "project_id": project_id,
  10. "project_title": project_title
  11. }
  12. })
  13. .done(function(data) {
  14. location.reload(true);
  15. $(location).attr('href',url1);
  16. })
  17. .fail(function(jqXHR, textStatus) {
  18. console.log("Request failed: " + textStatus);
  19. alert( 'Ошибка. Проверьте соединение и попробуйте позже' );
  20. });
  21. };
  22. }
  23.  
  24. function changeDescription(project_id, project_description, url1) {
  25.  
  26. if (project_description != null) {
  27.  
  28. $.ajax({
  29. type: "POST",
  30. url: "/change_description",
  31. data: {
  32. "project_id": project_id,
  33. "project_description": project_description
  34. }
  35. })
  36. .done(function(data) {
  37. location.reload(true);
  38. $(location).attr('href',url1);
  39. })
  40. .fail(function(jqXHR, textStatus) {
  41. console.log("Request failed: " + textStatus);
  42. alert( 'Ошибка. Проверьте соединение и попробуйте позже' );
  43. });
  44. };
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement