Closed philhanna closed 4 years ago
do_grid_new()
crossword.js
validateNewGridForm()
let n = document.forms["gn-form"]["n"].value;
n
{{ url_for('uigrid.grid_new') }}
do_grid_new
grid.js
<b>Grid size:</b> <em>(a single odd positive integer)</em>
javascript:validateNewGridFormAndSubmit()
validateNewGridFormAndSubmit
uigrid.grid_new
Old behavior
do_grid_new()
incrossword.js
do_grid_new()
makes the grid-new.html page visiblevalidateNewGridForm()
let n = document.forms["gn-form"]["n"].value;
and checks:n
is a numbern
is oddn
is positive{{ url_for('uigrid.grid_new') }}
New behavior
do_grid_new
function moved togrid.js
do_grid_new
uses input box with:<b>Grid size:</b> <em>(a single odd positive integer)</em>
"javascript:validateNewGridFormAndSubmit()
"validateNewGridFormAndSubmit
is the same as its predecessor except that if the number passes, theuigrid.grid_new
function is called.