socket.on('updaterooms', (rooms) => {
	let div_rooms = document.getElementById("rooms");

	console.log("rooms: ");
	console.log(rooms);

//	let div_room_count = div_rooms.childElementCount;
//	let div_room_list = document.getElementsByClassName("room_name");
//	console.log(".div_room_list: ");
//	console.log(div_room_list);
//	for(let room of div_room_list) {
//		console.log(room);
//		console.log(room.innerHTML);
//	}

	div_rooms.innerHTML = "";
	for (let room of rooms) {
		//console.log(room.name);
		const label = document.createElement("label");
		const p = document.createElement("p");
		const p_content = document.createTextNode(room.name);
		label.setAttribute('for', "input_outside");
		p.className = "room_name";
		p.appendChild(p_content);
		label.appendChild(p);
		div_rooms.appendChild(label);
	}

});

