Verdurian Dictionary bug

Almea and the Incatena
Post Reply
User avatar
Ketsuban
Posts: 193
Joined: Tue Nov 13, 2018 6:10 pm

Verdurian Dictionary bug

Post by Ketsuban »

The interface for the Verdurian dictionary is subtiy broken: you're using HTML form elements, but rather than using a form you've tied everything to an onclick handler on the button. As a result, if you type a word into the input box and press Enter you get something else happening—the first time I tried it I got an internal server error, but other attempts just refreshed the page.

I am no expert but it seems like this should be relatively simple to fix: add a wrapper <form> element, make the List button a <input type="submit"> rather than merely a <input type="button">, and call the existing Javascript in the onsubmit event of the form rather than the onclick event of the button.
sasasha
Posts: 478
Joined: Mon Aug 06, 2018 11:41 am

Re: Verdurian Dictionary bug

Post by sasasha »

As long as that wouldn’t take away a function of the current page: you can press List without entering anything to get the whole dictionary.
zompist
Site Admin
Posts: 3040
Joined: Sun Jul 08, 2018 5:46 am
Location: Right here, probably
Contact:

Re: Verdurian Dictionary bug

Post by zompist »

Unfortunately the fix doesn't work. I changed the form element to

<form name="theform" onsubmit="process();">

and the input button to

<input type="submit" value="List" >

and then nothing happens when the button is pushed.

(As usual, this is probably outmoded rather than incorrect practice. Google's AI thinks that onsubmit was added in 1999, and yeah, my site dates back before that.)
User avatar
Ketsuban
Posts: 193
Joined: Tue Nov 13, 2018 6:10 pm

Re: Verdurian Dictionary bug

Post by Ketsuban »

I am little help—my policy regarding Javascript is to not touch it and hope it goes away on its own. (I saw the same "discouraged" warnings on MDN; the reason given is that it's a mixture of concerns similar to using <FONT COLOR=#FF0000> all over the place rather than a CSS document.)
Post Reply