it worked fine with out joining a room a list of friends is displayed and on click, a new page is opened for chatting for individual friends
<table>
<tr>
<th>Name</th>
</tr>
{{#each friends}}
<tr>
<td><a href="/chat?name={{this.profileName}}">{{this.profileName}}</a></td>
</tr>
{{/each}}
</table>
then on chat_server.js where socket.io resides
socket.join(chatTable);//joining a room ! where problem rises
io.sockets.in(chatTable).emit('db chat message',rows);
then on web side
<form action="">
<input id="m" autocomplete="off" /><button>Send</button>
</form>
and on the jquery portion
$('form').submit(function(){
socket.emit('chat message', $('#m').val());
$('#m').val()='';
return false;
});
when joining a room is invoked... the page is refreshed with the url parameter(name) being gone and the socket.io being disconnected and reconnected.