473,385 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Insert javascript variable value in body of HTML page

6
I've done a form validation and I want to submit the form details output into the HTML page,so that I can view the details. How can you doing it using innerHTML
here's the form code.

[HTML]<form name="testform" action="exercise.html"
onSubmit="return checkrequired(this)">
<pre>
Company: <input type="text" name="requiredCompany">

Position: <input type="text" name="requiredPosition">

From date <input type=text name=from onBlur="checkdate(this)" size=11 maxlength=11>

To date <input type=text name=to onBlur="checkdate(this)" size=11 maxlength=11>

Description: <textarea name="requiredDescription"></textarea>


<input type='button' value="Submit">
</pre>
</form>[/HTML]
Nov 5 '06 #1
1 1392
acoder
16,027 Expert Mod 8TB
Put a div on the page, e.g.
[html]<div id="output"></div>[/html]then set its innerHTML:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById("output").innerHTML = jsVar;
May 27 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.