javascript - Play a sound on another web page via button click -


direct point of problem. have web app have queue management system. app use teacher call student base on queue. there 2 page in app want connect each other. page 1 home page teacher login account. in page there button [next queue]. page 2 real time queue each teacher.

when button in page 1 pressed, page 2 update next queue automatically (using ajax). behave chat app follow simple tutorial tutsplus simple web chat , change little make works in web app.

then problem how play beep sound in page 2 when teacher pressed button ? can't find tutorial play song on other page, found same single page. simpler solution checking button pressed, don't know how check if in page. i'm newbie in ajax , not proud javascript skill follow tutorial above.

thank in advance.

you can handle in ajax success event when scrollheight has been changed ( according tutorial reference ):

if(newscrollheight > oldscrollheight) {    $("#chatbox").animate({ scrolltop: newscrollheight }, 'normal');     /** play sound here **/    playsound(); } 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -