Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. function cloudClick(){
  2. cloudTab = document.getElementById("header_tabs_link_cloud");
  3. cloud = document.getElementById("cloud");
  4. mapTab = document.getElementById("header_tabs_link_map");
  5. map = document.getElementById("map");
  6.  
  7. if (cloudTab.classList == "inactive"){
  8. cloudTab.classList = "active";
  9. mapTab.classList = "inactive";
  10.  
  11. cloud.classList.add("visible");
  12. map.classList.remove("visible");
  13. }
  14. }
  15.  
  16. function mapClick(){
  17. cloudTab = document.getElementById("header_tabs_link_cloud");
  18. mapTab = document.getElementById("header_tabs_link_map");
  19.  
  20. if (mapTab.classList == "inactive"){
  21. cloudTab.classList = "inactive";
  22. mapTab.classList = "active";
  23.  
  24. cloud.classList.remove("visible");
  25. map.classList.add("visible");
  26. }
  27. }
  28.  
  29. function submit_cloud(){
  30. // GETTING FORM DATA
  31. twitterName = document.getElementById("cloud_name").value;
  32. numberToProcess = document.getElementById("cloud_number").value;
  33. depth = 0;
  34.  
  35. $.ajax({
  36. type: 'get',
  37. url: '/mainfunction',
  38. success: function(data){
  39. console.log(data);
  40. }
  41. });
  42.  
  43. }
  44.  
  45. function submit_map(){
  46. // GETTING FORM DATA
  47. twitterName = document.getElementById("map_name").value;
  48. numberToProcess = document.getElementById("map_number").value;
  49. depth = document.getElementById("map_depth").value;
  50.  
  51. // PASSING VARIABLES TO GOON
  52. $.ajax({
  53. type: 'post',
  54. url: '/mainfunction',
  55. dataType: JSON,
  56. data: {
  57. 'name' : twitterName,
  58. 'number' : numberToProcess,
  59. 'depth' : depth
  60. },
  61. success: function(data){
  62. console.log(data);
  63. }
  64. });
  65.  
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement