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

  • SEARCH
  • Home
  • 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 8677935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:35:24+00:00 2026-06-12T20:35:24+00:00

I have a HTML form (called form.html )and a JavaScript function such that when

  • 0

I have a HTML form (called form.html)and a JavaScript function such that when form is submitted, information in that form will be displayed.
Now I want all those info will be shown in new HTML page (called confirm.html), where should I go from?

NOTE: No php or sever-side or anything that really seriously related, it’s just simple OFFLINE HTML-form problem, I just have 2 html place in same folder, I will test it on my browser, that’s it. Only thing that I worry is how to use information from form.html file in confirm.html file since they are obviously separated.

Thank you very much, here is my form.html ( I dont have confirm.html yet)

    <HTML>
      <HEAD>
        <TITLE>Contact</TITLE>

        <script type="text/javascript">

          function addtext()
          {
             var fname = document.myform.first_name.value;
             var lname = document.myform.last_name.value;
             var email = document.myform.email.value;

             document.writeln("Thank you! You have just entered the following:");
             document.writeln("<pre>");
             document.writeln("First Name    : " + fname);
             document.writeln("Last Name     : " + lname);
             document.writeln("Email Address : " + email);
          }
        </script>
      </HEAD>
      <BODY>

      <center>
<b>CONTACT US</b> <br></br>   
<form name="myform">

  <label for="first_name">First Name </label>
  <input  type="text" name="first_name" maxlength="50" size="30">
    <br>
  <label for="last_name">Last Name </label>
  <input  type="text" name="last_name" maxlength="50" size="30">
    <br>
  <label for="email">Email Address</label>
  <input  type="text" name="email" maxlength="80" size="30">
    <br>
  <input type="submit" value="Submit" onClick="addtext()">

</form>

    </BODY>
    </HTML>
  • 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. Editorial Team
    Editorial Team
    2026-06-12T20:35:25+00:00Added an answer on June 12, 2026 at 8:35 pm

    Check out the window object of JavaScript: http://www.devguru.com/technologies/javascript/10855.asp

    It has a property location, if you write into it, your browser will redirect:

    window.location = "http://www.google.com";
    

    Note though, that this will not post your data to confirm.html. what you are trying to do without server-side scripting is not very useful. An HTML form will use CGI (common gateway interface) to send data to a server, that can then process the information. If you use the file:// protocol (as you seem to be doing; all local, static files), there is no server-side to process the data, only JavaScript.

    If using the GET method of sending the data through CGI, you could extract the data from the URL using javaScript (as mentioned in another question). To do this, just update your form like this:

    <form action="confirm.html" method="get">
    

    And do not put a onClick handler on the submit button, just let it submit.

    Many other tools exist though that way more are suitable for the job: server-side scripting languages, examples include PHP, ASP, JSP. For local setups, your best best is using XAMPP.

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

Sidebar

Related Questions

I have an HTML form which, when submitted by the user, will call a
I have an html form which when it gets submitted it calls a JavaScript
I have a form that I want to validate looks like this: <!DOCTYPE html
I am trying to write a Javascript function that will be called whenever a
I have a following problem, I have HTML form that uploads a file with
I have a HTML form that has certain fields which i am opening inside
I have a HTML form that accepts a comma separated list of tags, which
I have a HTML form; I want to be able to set it so
I have an HTML form that uses a PHP file in the form tag
I have a simple HTML form that uses uses ajax in part of the

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.