Run A Php Function On Document Ready?
Is there anyway for me to run a certain php function when the document loads completely? I am trying to run a function which will mark a notification as read only when the document
Solution 1:
You can detect the "document-ready" event with a Javascript script and when that is triggered, perform an AJAX request to a PHP page that will run the script you need.
Solution 2:
Solution 3:
You must use AJAX for this, php is done server side so AJAX is the only way :)
Post a Comment for "Run A Php Function On Document Ready?"