From: Carl Worth Date: Tue, 19 May 2020 15:44:34 +0000 (-0700) Subject: Actually make the top-level "join game" button work. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=958087d658fde6c960c87de96bd798aefc415292;hp=bd0a5b71f277551b6433eb4616d22ef1e807441c;p=lmno.games Actually make the top-level "join game" button work. Embarrassingly enough, when I first implemented the handling of this form, I only tested that it gave a proper error message for an invalid ID. Somehow I totally neglected to even test (let alone implement!) the handling of a valid ID. Fortunately, the missing implementation is _very_ easy. Just send the browser to the URL for the game ID that was entered. --- diff --git a/lmno.js b/lmno.js index e4785a8..34ac33c 100644 --- a/lmno.js +++ b/lmno.js @@ -16,6 +16,9 @@ function join_loadend(request, game_id) { add_message("danger", game_id + " is not a valid game ID. Try again."); return; } + + /* Now that its validated, send the browser to the URL for the game_id. */ + window.location.href = "/" + game_id; } function lmno_join(form) {