Advertisement
Guest User

Untitled

a guest
May 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. //run button submission
  2. $(function () {
  3. $("#go-button").click(function () {
  4.  
  5. //gets the value of the twitter-handle
  6. var twitter_handle = $('#inputDefault').val();
  7.  
  8. //use global selected
  9. election = selected;
  10. //alert("twitter_handle: " + twitter_handle + " | Election: " + election);
  11.  
  12. //external call to python
  13. })
  14.  
  15. $.ajax({
  16. crossDomain: true,
  17. data: {},
  18. dataType : "json",
  19. withCredentials: "true",
  20. jsonpCallback: 'callback',
  21. success: function(da){
  22. alert(da);
  23. },
  24. error: function(){
  25. alert("FAILURE");
  26. },
  27. url: "http://localhost:8000/backend/ajax_caller.py"
  28. }).done(function(data) {
  29. //;
  30. });
  31.  
  32. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement