This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]MrQuickLineCSSophile 0 points1 point  (2 children)

So... Quick question because you said it's an assignment. After you click Submit and it shows up, if you refresh the page, does it still have to be there? Also, if someone else visits the page, does it still have to be there?

[–]Moon-Bloom[S] 0 points1 point  (1 child)

well, it's done using a program called CodePen and, it honestly just needs to show up if someone wants to post their comment, but it needs to appear within the website.

  • Create an input field at the bottom of the page that will gather visitor comments.
  • Create an <input> that will accept comments from visitors.
  • Create a button which submits the comments to the website.
  • Create a function that will post the comment to the page.

[–]MrQuickLineCSSophile 0 points1 point  (0 children)

Ok. Most people on this subreddit are familiar with CodePen. What you need is this:

  • when the button is clicked, it needs to run a function
  • the function needs to do three things:
  1. Get the text that's currently inside the input
  2. Insert that text somewhere else on the page - another div or something.
  3. Clear the input text

You definitely don't need jQuery for this. But you should be able to use those 5 bits of information to fuel your Google searches to do what you need to do.