<div class="buttons">
<p><input type="text" name="userName" placeholder="Name:" size="18" /></p>
<p><input type="text" name="userName" placeholder="Name of the room:" size="18" /></p>
<a href="#" class="modal__trigger2">Join Room</a>
</div>
function openURL()
{
let user = document.getElementById('userName').value;
let room = document.getElementById('roomName').value;
var url = '/?user=' + encodeURIComponent(user) + '&room=' + encodeURIComponent(room) ;
window.location.href = url;
}