www.webdeveloper.com
Results 1 to 5 of 5

Thread: Form input/submit button help

  1. #1
    Join Date
    Oct 2012
    Posts
    36

    Form input/submit button help

    Hey guys so I'm in a need of some assistance, I am looking to make a mini site with some code. and what I wanted it to be is like the following

    Date: Input Field
    Phone Number: Input Field
    Customer name: Input Field
    email address: Input Field
    issue: Input Field
    results: Input Field

    Submit

    I then want to have a submit button under all this, and what I want to be able to do is have the submit button when pressed to open up a new tab with the information i just inputted saved, but also to be able to go back to the input field and add a second batch of information for another customer, so that no matter what i can keep saving into the same tab and see the results from all the submissions. this is idealy what i would like to begin with





    This is the below code that i found

    but i also would like the text aligned in the center but with the other text and the input boxes centered and aligned with each other

    Any help would be greatly appreciated.

    HTML Code:
    <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("<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">Date </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>

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,213
    What is the purpose of having the new pop up? Keep in mind that people have popup blockers, so for all your efforts you are going to have problems with browsers that actively block attempts for websites to open a popup window.

    If you are taking information that will be entered in to a website database, then submit it to the server and any issues thereafter, the returning page can relay that information or you can have a server echo what was sent to the server. It is a much better option as the site then won't be subjected to the popup blocker policy.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  3. #3
    Join Date
    Oct 2012
    Posts
    36
    This is for my own personal use.

    so all i want is some assistance on how exactly to do this cause i know its possible,

  4. #4
    Join Date
    Oct 2012
    Posts
    36
    is there anyone that can help me please

  5. #5
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,213
    Try changing <form name="myform"> to <form name="myform" onsubmit="return false;"> and see what happens.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles