Advertisement
Guest User

Untitled

a guest
Sep 8th, 2015
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3.  
  4. $("body").on("click", function(e) { console.log(e.target); });
  5.  
  6. // _GET to see if there are notes or not
  7. var recipient = "<?php echo $_SESSION['username'];?>";
  8. console.log("The recipient is: " + recipient);
  9. $.get("../modules/notes_v2.php",{recipient: recipient},function(data){
  10. if(data != ''){
  11. $('.user_bar').hide();
  12. $('.motd_content').hide();
  13. $('.job_listing_content').hide();
  14. $('.bidding_administration_content').hide();
  15. }
  16. $('.notes_box_content').html(data);
  17.  
  18. });
  19.  
  20. $('#ackbutton').click(function(){
  21. var noteid = this.id;
  22. console.log("the id of this note is " + noteid);
  23.  
  24. // Take the id of the note and set viewed = '1' for that id in the notes table. Calling handlers/notes_v2.php
  25. $.get("../handlers/notes_v2.php",{id: noteid},function(data){
  26. var data = data.trim(data);
  27. if(data == "OK")
  28. {
  29. $('.user_bar').show();
  30. $('.motd_content').show();
  31. $('.job_listing_content').show();
  32. $('.bidding_administration_content').show();
  33. }
  34. });
  35. });
  36. });
  37. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement