SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist BJ Duncan's Avatar
    Join Date
    Jun 2007
    Location
    Bowen Mountain, NSW
    Posts
    490
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do you auto-populate text boxes with data from a database?

    G'day to all,

    I am not all that familiar with javascript and I wondering if anyone maybe able to point me in the direction of a good (simple) tutorial on how to auto populate text fields in a form when a user makes a selection in the first field. My data is being pulled from a MySQL database.

    E.g.

    Question: Business Name?
    <drop-down menu here with all business names in the database>

    When a user selects the business name - all the other boxes, ie. Address, Contact etc are filled in automatically. With the data being pulled from a mysql database.

    I hope this makes sense and any assistance would be very much appreciated.
    Regards,
    BJ Duncan

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Doing a google search for
    ajax auto-populate
    gave some good results, including http://remysharp.com/2007/01/20/auto...g-jquery-ajax/
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

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