/    Sign up×
Community /Pin to ProfileBookmark

getting info fm textfield

i have a text field in which the user types his name.

how do i get that info and put it in text?

my text is a greeting to the student but i would like to add his name. it is not a text field. just text in a table.

the login page has a submit button also.
after the submit button is clicked, a layer pops up with the text in it greeting the student [I]by name[/I].

p.s. i’ve never worked w/html before, where do i put this code?

?

david

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@Sup3rkirbyDec 09.2005 — It looks like you want to display a greeting in the HTML the includes the user's(student's) name.

But now, are you wanting to do it with a login page that takes you to the page where you greeting will be, or do you want to have the request for the name on the page with the greeting, and after their name is entered, the greeting changes to greet them personally?

Please answer this and i should be able to help you.
Copy linkTweet thisAlerts:
@DJRobThaManDec 09.2005 — So, if what you want is to dynamically display the name from this textbox on the same page you'd do something like this

[CODE]
<input type="text" id="name">
[/CODE]


and have somewhere else where you want to put the name

[CODE]
<div id="display"></div>
[/CODE]


and then in the script have

[CODE]
function displayname()
{
document.getElementById("display").innerHTML = document.getElementById("name").value;
document.getElementById("name").value="";
}
[/CODE]


But if what you want is a login page and another page that displays the name it might be easier to do it in perl, where you have the text box within a form linked to the .cgi file and using param('username') where username is the name attribute of the text box then use the print function to create the website with the name wherever you want it
Copy linkTweet thisAlerts:
@dbenedettoauthorDec 09.2005 — it's in a layer on the login page. after clicking the submit button the login disappears and the greeting (layer) shows up.

?

david
×

Success!

Help @dbenedetto 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.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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