Click to See Complete Forum and Search --> : Display Preview from user input?


C-Yeo
08-17-2006, 05:50 AM
Expertise required~

Does anyone know how to display input by user in a html form in the same page without clicking a button?

<form method=”POST”>
<input type="text" name="name" id="name "size="60" maxlength="50" value="">
</form>

when user input their name in the form, I need to display the "value" in a thanks you message below the form. Explaination will be a bonus, cos i'm still new other programming languages. :p

any help would be very much appreciated~~ Thanks~ :D

Kravvitz
08-17-2006, 05:46 PM
You could do it with JavaScript, but since not all Internet browsers use a browser that has support for it enabled, I suggest you just wait for the user to submit the form and use a server-side language to output the message.

C-Yeo
08-17-2006, 10:42 PM
Kravvitz, thanks for your reply.

so the input from my form will be "post" to a database (MySQL), and a "Preview" submit button to link to a seperate window using PHP to retrive data and to display. Does this sounds correct?

Kravvitz
08-18-2006, 12:59 AM
No. Just submit the form and in whatever page is set as the action of the form show the thank you message.

C-Yeo
08-18-2006, 08:30 AM
i see. thanks for your advise. :D