How to stop redirection when meeting id enter wrong

As per my requirement, I want check meeting id is validated using javascript function

enter_room_button_click.addEventListener(‘click’, function(e) {
var enter_room_field_v = document.getElementById(“enter_room_field”).value;
if (enter_room_field_v == ‘join-123’) {
return true;
} else if (enter_room_field_v != ‘’) {
alert(‘You enter wrong meeting id’);
return false;

but the page still redirects to room screen when enter the wrong meeting id please provide me any solution.

1 Like