Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(document).ready(function(){
- $("body").on("click", function(e) { console.log(e.target); });
- // _GET to see if there are notes or not
- var recipient = "<?php echo $_SESSION['username'];?>";
- console.log("The recipient is: " + recipient);
- $.get("../modules/notes_v2.php",{recipient: recipient},function(data){
- if(data != ''){
- $('.user_bar').hide();
- $('.motd_content').hide();
- $('.job_listing_content').hide();
- $('.bidding_administration_content').hide();
- }
- $('.notes_box_content').html(data);
- });
- $('button').click(function(){
- var noteid = this.id;
- console.log("the id of this note is " + noteid);
- // Take the id of the note and set viewed = '1' for that id in the notes table. Calling handlers/notes_v2.php
- $.get("../handlers/notes_v2.php",{id: noteid},function(data){
- var data = data.trim(data);
- if(data == "OK")
- {
- $('.user_bar').show();
- $('.motd_content').show();
- $('.job_listing_content').show();
- $('.bidding_administration_content').show();
- }
- });
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement