Results 1 to 2 of 2

Thread: form output troubles

  1. #1
    Join Date
    May 2011

    form output troubles

    Hi guys
    i am trying to make a form that out puts the inputs to a table and makes the form disappear in the process. I am encountering too problems though

    a) at the submitt bit it says object expected for "document.getElementById('tablename').value=

    why what did i forget to do??

    b) am i missing a section of code needed to not only output the data to table but make form disappear?

    this is the full code
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    		<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
    		<!-- Local JavaScripts -->
    		<script type="text/javascript">
    			// --------------------------------------------
    			// the 'program' - the CONTROL LAYER
    			function getElementById(" " )	
    				button onclick="document.getElementById(" ")
    			// ---------------------------------------------
    			// The global variables - the PERSISTENCE LAYER (sort of!)
    			var Name;
    			var Number;	
    			var button onclick="document.getElementById(" ")
    			// ---------------------------------------------
    			// The processing functions - the LOGIC LAYER			
    			// ---------------------------------------------
    			// The input/ output functions - the PRESENTATION LAYER
    			//      THIS enhanced presentation layer uses a web page form for input
    			//      and output.			
    		<form name="form" action=" " >
    			INPUT DATA:<br/><br/>
    			Customer name (text): <input name="dataInputName" id="Name" type = "text" size="30" /><br/><br/>
    			Phone number (text): <input name="dataInputNumber" id="Number" type ="text" size="10" /><br /><br />
    			<button onclick="document.getElementById('tablename').value=
    					<td id="tablename">
    					<td id="tablenumber">

  2. #2
    Join Date
    Dec 2003
    Bucharest, ROMANIA
    It looks like you have not understood the basis of the basis of the JavaScript language, its syntax, events and methods.

    You need first to study:

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