Gossamer Forum
Home : General : Chit Chat :

Javascript that takes textbox content and ONBLUR displays contents on same page

Quote Reply
Javascript that takes textbox content and ONBLUR displays contents on same page
Hi All

On a Contact page using a form, I think it would be a nice touch if a javascript could take the contents of the First Name field and immediately post the name on the same page. Then, after the visitor fills in all fields, they would just send their note normally.

For example, if I have a contact form that has fields like:

First Name:
Last Name:
Email:
Issue:

Then, once the visitor filled in the First Name field and clicked outside of that box (ONBLUR), the javascript would snag the contents of the First Name field and display it in a nice Welcome sentence right above the contact form:

Welcome, Fred !

First Name: Fred
Last Name:
Email:
Issue:

Would anyone know of any javascript that could do this? I haven't found one, yet.

Thanks very much. Smile

------------------------------------------

Last edited by:

DogTags: Oct 14, 2002, 10:10 AM
Quote Reply
Re: [DogTags] Javascript that takes textbox content and ONBLUR displays contents on same page In reply to
You could do it using a disabled text field, attached is a quick example.

I'm certain there are better ways such as not using a disabled text field but maybe it will give you a head start.

Last edited by:

Paul: Oct 14, 2002, 2:47 PM
Quote Reply
Re: [Paul] Javascript that takes textbox content and ONBLUR displays contents on same page In reply to
Very interesting, Paul !

Thanks ! Smile

------------------------------------------

Last edited by:

DogTags: Oct 15, 2002, 4:50 AM