/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] form function displaying results on same page

Hello,

I am really new to html but what I need is help in completing a from with a drop down select box, a submit button, and then a text box to display the results of the selection made from the dorp down box.

Could someone provide and example of how to do this?

to post a comment
HTML

6 Comments(s)

Copy linkTweet thisAlerts:
@Randy_The_NewbeauthorApr 10.2006 — Here is what I have so far. What it is that I need is a way to display in a text box the information assoicated with each state. I was hoping it would be a way to hard code the results into the page itself. Any help??

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>New Page 1</title>

</head>

<body>

<form method="POST" action="--WEBBOT-SELF--">

<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->

<p><select size="1" name="D1">

<option value="Indiana">Indiana</option>

<option value="Ohio">Ohio</option>

</select><input type="submit" value="Display" name="B1"><textarea rows="2" name="S1" cols="20"></textarea></p>

</form>

</body>

</html>
Copy linkTweet thisAlerts:
@balloonbuffoonApr 10.2006 — I'm not sure if this is what you are trying to do:
[code=html]<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
</head>

<body>

<form>
<p><select size="1" name="D1">
<option value="Indiana">Indiana</option>
<option value="Ohio">Ohio</option>
</select><input type="button" value="Display" name="B1" onclick="S1.value=D1.value"><textarea rows="2" name="S1" cols="20"></textarea></p>
</form>

</body>

</html>[/code]


--Steve
Copy linkTweet thisAlerts:
@Randy_The_NewbeauthorApr 10.2006 — Thank you for the assistance. What it is I need to display when a state is selected is the various department names and reps for each department.
Copy linkTweet thisAlerts:
@balloonbuffoonApr 10.2006 — How about this?
[code=html]<html>

<head>
<title>New Page 1</title>
<script>
depts = new Array();
depts["Indiana"] = "Department 1 - John DoenDepartment 2 - Mr. Smith";
depts["Ohio"] = "Department 1 - Suzy QnDepartment 2 - Jane Doe";
</script>
</head>

<body>

<form>
<p><select size="1" name="D1">
<option value="Indiana">Indiana</option>
<option value="Ohio">Ohio</option>
</select><input type="button" value="Display" name="B1" onclick="S1.value=depts[D1.value]"><textarea rows="5" name="S1" cols="30"></textarea></p>
</form>

</body>

</html>[/code]


--Steve
Copy linkTweet thisAlerts:
@Randy_The_NewbeauthorApr 10.2006 — Excellent, that will work great. Thank you for your assistance.
Copy linkTweet thisAlerts:
@balloonbuffoonApr 10.2006 — No problem!

--Steve
×

Success!

Help @Randy_The_Newbe 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 6.1,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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