Call function with parameters - problem
Having problems executing the function runupdate (line 26)
Example page

Jquery code call function
- <script>
-
- $(function() {
- // Function to read #log div
- function runupdate(personsIDval) {
- alert('inside runupdate function');
- var events = [];
- var idRE = /^Event ID : (\d+).*$/;
- $('#log div').each(function() {
- events.push(idRE.exec($(this).text())[1]);
- });
- $.get('runupd.php', {personsID: personsIDval, eventsID: events}, function(data) {
-
- });
- }
-
- });
-
- $(function(){
- //Click button to run function - will loop thru the #log div
- $("input#runupdate2").click(function(){
- $('#log div').each(function(i) {
- var text = $(this).text();
- // call and send variable to function
- var personsIDnr = '007'
- runupdate(personsIDnr);
- });
-
- });
- });
- </script>
Program : runupd.php
- <?php
// program : runupd.php
// Do mysql select update etc....
echo $personsID;
echo $eventsID;
print_r ($_GET);
sleep(30);
?>