Thursday, 27 April 2017

Confirm is prompt one by one on users screen javascript

I'm making project using socket.io nodejs,When server emits to all users in a room, In client side there is confrim javascript function,Which is being called one by one in all users screen,below is client side code,

socket.on('resetcount',function(){
    if (confirm('Do you want to reset board?')) {
        socket.emit('count',roomnumber);
    }
});

Is it possible that it will prompt at the same time in all users screen, Or socket.io server works this way?



via Mehul Prajapati

No comments:

Post a Comment