Javascript/PHP: send a pop up or some alert to users who have permissions? -


i have site used operators in factory don't log in have 0 permissions, users in office have permissions.

what need is, upon click of button submits note sql database job , operation number, send pop or kind of alert message logged in.

this in form of opening new tab or method really.

what i've got far cell highlights relevant job has note, want provide alert when new message present, opposed old note displaying highlighted cell.

can please provide suggestions?

edit: sorry, here's code on operator's page, requires no permissions update database.

<script type="text/javascript">     function savenotes() {         var jobid = "<?php echo $_get['jobid']; ?>";         var operation = "<?php echo $_get['operation']; ?>";         var nnotes = document.getelementbyid('notes').value;         if (nnotes == 'null') nnotes = "";         sendasync("editdatabase.php?sql=update+operations+set+notes='"+nnotes+"'+where+jobid="+jobid+"+and+operation="+operation);          alert("your note has been submitted")     }     </script> <body> <input method="post" onload="initialise();" class="onload auto notes" data-type="text" style="display:inline;" id="notes" value="<?php echo $row["notes"]; ?>" size="15" placeholder="type note..">         <button onclick="savenotes();" style="font-size:25px;padding-left:15px;padding-right:15px;" alert="your note has been sent" >send</button></td> 

what want alert of kind pop on page titled 'home.html' users permission>1

i hope helps..


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -