You have several problems. Some could be solved by looking at the error console if you are using FF or Chrome browsers.
First off, JS is case sensitive.
You can not define an element, for example <div> to have an id='foodoptions'
but then try to reference it with the getElementById('foodOptions').
Next you need to know that the document.myform.newtext.value is not defined if your form is named 'myForm'
Plus, the <form> tag I supplied did not use the name= option, so the reference is totally invalid.
name = has been deprecated, which is why I used the id="myForm" definition with the document.getElementById retrieval method.
Finally, you changed the <form> tag by removing the action definition. It needs to do something when the form validates.
You tell it do submit, but there is nothing to submit to. Boom ... you die again if you were playing an RPG!
It is also better for coding purposes that you define the problem fully and code to your needs.
It is somewhat wasted effort if you change the requirements mid-stream and need to recode previous working code.
So, bottom line, give it another try and let's see the changes you come up with.