/    Sign up×
Community /Pin to ProfileBookmark

Form and Javascript Acknowledgment

Hi everyone, I am new to the forums and have a question or two. I did use the search function to try and find an answer to my dilemma but was un-successful. Here is what I am looking for;

I am trying to create a web page with a form that displays the user inputted data on an acknowledgment page. For instance, if the user put in john doe for name, [email][email protected][/email] for email address I would like them to be able to see it after they hit submit on the acknowledgment page. How would I do this? I know I can use Javascript but not sure how the code would look or go. Any help is appreciated. Thanks.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@JavaBeginner05authorFeb 15.2011 — 31 views and no one has any responses? Please anyone help?
Copy linkTweet thisAlerts:
@tirnaFeb 15.2011 — 
31 views and no one has any responses? Please anyone help?
[/QUOTE]


Do you want to learn how to do it or do you want someone to provide you with code for free?

If you want to learn, have a go at it and if you get stuck post back with your code and we can try to help you get it working. You should be able to at least provide the html.
Copy linkTweet thisAlerts:
@JavaBeginner05authorFeb 15.2011 — Alright, here is my HTML code. You can see the form within the document.
<i>
</i>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Kudler Fine Foods Mailing List&lt;/title&gt;

&lt;!-- The link below attaches external style sheet --&gt;
&lt;link rel="stylesheet" type="text/css" href="css/Mailing List.css" /&gt;

&lt;/head&gt;

&lt;body&gt;


&lt;!-- Begins Container for header and image --&gt;
&lt;!-- KFFbgImageLogo.jpg taken from University of Phoenix. (2010). Kudler Fine Foods. Retrieved from <a href="https://ecampus.phoenix.edu/secure/aapd/CIST/VOP/Business/Kudler2/index.htm">https://ecampus.phoenix.edu/secure/aapd/CIST/VOP/Business/Kudler2/index.htm</a> --&gt;

&lt;div id="contentContainer"&gt;
&lt;div id="header"&gt;
&lt;a href="../index.htm"&gt;
&lt;img
src="images/KFFBgImageLogo.jpg"
alt="Kudler Fine Foods Home" class="KFFBgImageLogo" /&gt;
&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;



&lt;!-- Begins main content --&gt;
&lt;!-- KFFHeaderLogo.jpg taken from University of Phoenix. (2010). Kudler Fine Foods. Retrieved from <a href="https://ecampus.phoenix.edu/secure/aapd/CIST/VOP/Business/Kudler2/index.htm">https://ecampus.phoenix.edu/secure/aapd/CIST/VOP/Business/Kudler2/index.htm</a> --&gt; <br/>
&lt;div id="main"&gt;
&lt;div id="content"&gt;
&lt;div id="contentHeader"&gt;&lt;img src="images/KFFHeaderLogo.jpg" width="900" height="300" alt="Kuddler Fine Foods" class="KFFHeaderLogo" /&gt;&lt;/div&gt;
&lt;div id="form"&gt;
&lt;h1&gt;Join Our Mailing List&lt;/h1&gt;

<i> </i> &lt;!-- This is the start of the form information --&gt;
<i> </i> &lt;form&gt;
<i> </i> &lt;form action="acknowledgement.html" method="post" onSubmit="verify()"&gt;
<i> </i> &lt;p&gt;Name:
<i> </i> &lt;label&gt;
<i> </i> &lt;input name="nameInput" type="text" class="inputColor" id="nameInput" size="51" maxlength="35" /&gt;
<i> </i> &lt;/label&gt;
<i> </i> &lt;/p&gt;
<i> </i> &lt;p&gt;Address:
<i> </i> &lt;label&gt;
<i> </i> &lt;input name="addressInput" type="text" class="inputColor" id="addressInput" size="49" maxlength="65" /&gt;
<i> </i> &lt;/label&gt;
<i> </i> &lt;/p&gt;
<i> </i> &lt;p&gt;Email Address:
<i> </i> &lt;label&gt;
<i> </i> &lt;input name="emailInput" type="text" class="inputColor" id="emailInput" size="42" maxlength="55" /&gt;
<i> </i> &lt;/label&gt;
<i> </i> &lt;/p&gt;
<i> </i> &lt;p&gt;Telephone Number:
<i> </i> &lt;label&gt;
<i> </i> &lt;input name="telNumber" type="text" class="inputColor" id="telNumber" size="18" maxlength="20" /&gt;
<i> </i> &lt;/label&gt;
<i> </i> &lt;/p&gt;
<i> </i> &lt;p&gt;Comments :
<i> </i> &lt;label&gt;
<i> </i> &lt;textarea name="comments" cols="45" rows="7" class="inputColor" id="comments"&gt;&lt;/textarea&gt;
<i> </i> &lt;/label&gt;
<i> </i> &lt;/p&gt;
<i> </i> &lt;p&gt;
<i> </i> &lt;input type="submit" name="submit" id="subButton" value="Submit Form" /&gt;
<i> </i> &lt;input name="resetButton" type="reset" class="reset" id="resetButton" value="Reset Form" /&gt;
<i> </i> &lt;/label&gt;
<i> </i> &lt;/p&gt;
<i> </i> &lt;/form&gt;
<i> </i> &lt;/div&gt;
<i> </i> &lt;/div&gt;
<i> </i>&lt;/div&gt;

<i> </i>&lt;!-- This is start of footer --&gt;
&lt;div id="footer"&gt;

&lt;p&gt;&amp;#169; 2011 Chance Locknane, University of Phoenix&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;



Either way, I know the Javascript can be external or nested within the head of the document or even inline however, I am not sure how the code would look to display the form entered data on the acknowledgment page. I do not have a hosting company for cgi so I cannot use that method. So, if anyone can at least point me to a good reference for what I want or give me a start it would be nice, thanks.
Copy linkTweet thisAlerts:
@KorFeb 15.2011 — 
I am trying to create a web page with a form that displays the user inputted data on an acknowledgment page. For instance, if the user put in john doe for name, [email][email protected][/email] for email address I would like them to be able to see it after they hit submit on the acknowledgment page[/QUOTE]

This is rather a job for a server-side application, not for JavaScript (which is a client-side language)


I see you are calling a function verify() onsubmit. Where is that function? What does it suppose to do?
×

Success!

Help @JavaBeginner05 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 4.30,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...