Skip to content

Play an alarm with the table value in webapge

I have a webpage containing a table that auto-refresh everytime & updates the table values. I want to add an alarm when the table value reached a threshold value so I don’t have to look at the table always. what is the best possible way to do this?
My webpage is updating data using PHP. I know this is somewhat possible using javascript. Also, I found there is a limitation in doing this without a user gesture

Answer

i found another post with something similar and if your refreshing all the time then you could make a PHP if else statement to check database values and run the audio.

if ($value > 10){play audio}else{nothing}

Play a sound on page load using JavaScript