Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Auto fill on forms (2002)

    Hi,

    Is there a way to make a textbox autofill from one form to another? For example, if there is a textbox on a form for the person's name I'd like it to autofill in on other forms on the website that contain their name. If so, what would the code look like?

    Thanks,
    Leesha

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Auto fill on forms (2002)

    You can attach JavaScript to events on your fields to make changes in that page. For example, when the first textbox is changed, you can react to that by updating other <input> controls. It sounds as though you would like to update other pages, and for this you have two choices:

    (1) Serve the page with the information already included (<input ... value="username">); or
    (2) Use JavaScript to add the information after the browser loads the page.

    In either case, cookies probably would be needed. In the first case, the server would read the cookie and use that information to fill in the field. In the second case, JavaScript in the browser would read the cookie and fill in the field.

    If the information is "sensitive", it would be better to put some kind of code in the cookie and have the server look it up in a database rather than have the information itself in the cookie.

    Does this help?

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Auto fill on forms (2002)

    Hi, yes it does help. Fortunately the information isn't sensitive. I just want the forms to be user friendly.

    Thanks!
    Leesha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •