/    Sign up×
Community /Pin to ProfileBookmark

Display form results on same page with javasctipt

I need one task to be done and I’m not 100% clear with it.

I need to make html form with input fields, that writes informations on the same page. (So when someone enter his name and telephone, in the form on the left side and clicks SUBMIT > the results get on the right side)

Also the display results should be paginates, do one can enter up to 25 results per page.

I know HTML part, but I’m not clear with Javascript.

I supose I must use getelementbyID, and then write it, but can someone help me and describe me process more detailed so I can find some tutorials and learn how..

Thanks in advance for your time!

Regards

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@xelawhoSep 01.2012 — a simple example that might get you started:
[CODE]
<head>
<style>
#entries,#results{float:left}
</style>
</head>
<body>
<div id="entries">
<form name ="myform">
Enter name: <input type="text" name="nm"/><br>
Enter age: <input type="text" name="ag"/><br>
<input type="button" value="display" onclick="collect(this.form)"/>
</form>
</div>
<div id="results"></div>
<script type="text/javascript">
function collect(frm) {
document.getElementById("results").innerHTML+="Name: "+frm.nm.value+"<br>Age: "+frm.ag.value+"<hr>"
frm.reset();
}
</script>
</body>
[/CODE]
Copy linkTweet thisAlerts:
@disktantSep 01.2012 — Ops, wrong post
×

Success!

Help @kashmirs22 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...