I have a php script that returns an echo of ‘Hello’ when accessed half the time (just based on a random number).
Is it possible to make a javascript script on a HTML page that will:
Go to the the PHP page,
If ‘Hello’ is returned it will show an alert of ‘Goodbye’
ELSE
It shows ‘nothing found’
What do I need to do this?
That is called AJAX. Example:
See also:
https://developer.mozilla.org/en/AJAX/Getting_Started