Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 160825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:06:13+00:00 2026-05-11T11:06:13+00:00

I am not a big web programmer, and have a friend who wants me

  • 0

I am not a big web programmer, and have a friend who wants me to help him with something.

He wants to be able to have a form that once it is submitted changes to say something like ‘Thanks for submitting’ and have the form info disappear. He wants it to be easy for anyone to use, so he can give it to various people to use on their sites.

I was thinking I could use javascript to do it, but not really 100% sure. I want to avoid anything that isn’t HTML as much as possible so that it will be usable by as many people as possible.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:06:14+00:00Added an answer on May 11, 2026 at 11:06 am

    What is supposed to happen to the information in the form? Doesn’t matter?

    If you want it to be pure HTML there’s only one good solution: Write one HTML page with the form, and another almost identical one with the success message in place and the form data hidden. Simple.

    On the submitting side:

    <h1>Email Subscription:</h1> <form action='successForm.html'> <input type='text' name='emailAddress' /> <button type='submit'>Send Info</button> </form> 

    On the receiving side (successForm.html)

    <h1>Email Subscription:</h1> <p>Great job, you submitted!</p> 

    However, if you need something to change on the very same page, you’re going to have to use something non-HTML. HTML just won’t make any decisions about what to display. It is dumb… it just displays.

    It’s very easy to use JavaScript to detect when the form was submitted, and then hide the elements you need to hide, and show the success message:

    <!-- Goes in the <head> or in a seperate script --> <script type='text/javascript'>     var theSubmitButton = document.getElementById('formSubmit');      theSubmitButton.onclick = function() {         var theFormItself =              document.getElementById('theForm');         theFormItself.style.display = 'none';         var theSuccessMessage =              document.getElementById('successMessage');           theSuccessMessage.style.display = 'block';               } </script>  <!-- Goes in the body --> <h1>Email Subscription:</h1> <p id='successMessage'>You submitted the form, good job!</p> <form id='theForm' action='successForm.html'>     <input type='text' name='emailAddress' />     <button id='formSubmit' type='submit'>Send Info</button> </form> 

    Of course, this example is oversimplified. It doesn’t do anything with the data, and it doesn’t follow best practices, or check that the data is valid in any way. I’m just trying to give a basic idea of how to use JavaScript for this purpose. If you’re not a programmer, then coming up with a small, distributable piece of software might be a good job for someone else.

    However, you still need some mechanism to store, email or otherwise DO something with the form. Add an edit to your question and I’ll be happy to clarify my answer with a specific example.

    (Another note, I didn’t try to run that Javascript, so if you see an error, please just note and I’ll fix it)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer This is because the ComponentConfigurations section does not not contain… May 11, 2026 at 1:59 pm
  • added an answer Strictly speaking, it's not possible to do that in the… May 11, 2026 at 1:59 pm
  • added an answer I'd check (using C# for the example): bool isMidnight =… May 11, 2026 at 1:59 pm

Related Questions

I am not a big fan of datasets so I use POCO to return
I am not a fan of using SQL*PLUS as an interface to Oracle. I
I am not a mathematician. I enjoy a good math puzzle, but I admit
I am not a DBA by any means, but being a web developer means
I am not a designer, but I have noticed many changes between firefox and
Summary: Can I program a thick client game in C without reinventing wheels ,
Using WCF in a RESTful way seems great. I’m a big fan of the
I am going to spend 30 minutes teaching Perl to an experienced programmer. The
I am designing this HR System (desktop-based) for a mid-size organization. The thing is

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.