Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Fill in the blank generator

Posted by: richardja Nov 13 2020, 10:07 AM

Hi. I am trying to create a fill-in-the-blank paragraph using HTML.

For example: This is a ____ sentence.

The ____ needs to be a text box that viewers can write in. Once they submit it, I want it to draw from a list of words that I have embedded into the HTML. So, some people might end up with, "This is a good sentence," while others will end up with "This is a bad sentence."

Do you have any tips or code to help me create this?

Posted by: Christian J Nov 13 2020, 11:45 AM

What determines the kind of reply each user gets?

Are you going to save the contributions? Then you need server-side scripting (say PHP), and maybe a database.

Or are they just meant to be seen by each user? Then it's enough to use javascript.

Posted by: richardja Nov 13 2020, 11:52 AM

I am not going to save the contributions; they are just for each user to see. I am not sure if I can use javascript. It is going into an online classroom on a platform that is increasingly making it more difficult to use Javascript (Canvas).

As far as what determines each reply, I am not totally sure what options exist. If synonyms were possible, I could do that. But then would I have to list every possible synonym somewhere in the code?

QUOTE(Christian J @ Nov 13 2020, 11:45 AM) *

What determines the kind of reply each user gets?

Are you going to save the contributions? Then you need server-side scripting (say PHP), and maybe a database.

Or are they just meant to be seen by each user? Then it's enough to use javascript.


Posted by: Christian J Nov 13 2020, 02:07 PM

QUOTE(richardja @ Nov 13 2020, 05:52 PM) *

I am not going to save the contributions; they are just for each user to see. I am not sure if I can use javascript. It is going into an online classroom on a platform that is increasingly making it more difficult to use Javascript (Canvas).

Canvas is something different. Otherwise javascript is used on virtually the whole web nowadays. That said, server-side (e.g. PHP) is more robust, but it requires a server that lets you run server-side scripts.

QUOTE
As far as what determines each reply, I am not totally sure what options exist. If synonyms were possible, I could do that. But then would I have to list every possible synonym somewhere in the code?

Yes I suppose so.


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)