SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist Tapan's Avatar
    Join Date
    May 2005
    Location
    India
    Posts
    563
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to get value from dropdowns for Ajax ?

    Hello,

    I have 41 <select> fields in a form. When a user makes any selection or change to any dropdown I want to do ajax and send the values of 41 dropdown's to a php page which will compute the values and return a single value which should be displayed in a div.

    I don't want ready made code, please just push me in the correct direction.

    Thanks.

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,492
    Mentioned
    161 Post(s)
    Tagged
    4 Thread(s)
    Do you want to know how to write the PHP code that computes the value?
    Or do you need help with the javascript part? In that case, I'll ask for the thread to be moved to the JS forum, where you'll probably be able to get more help.

  3. #3
    SitePoint Evangelist Tapan's Avatar
    Join Date
    May 2005
    Location
    India
    Posts
    563
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    Do you want to know how to write the PHP code that computes the value?
    Or do you need help with the javascript part? In that case, I'll ask for the thread to be moved to the JS forum, where you'll probably be able to get more help.
    Hi,

    I want help with javascript part.

    Thanks.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,678
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    One of the easy ways to use ajax us via a library that handles much of the work for you, such as jQuery and the $.post() or $.ajax() commands.

    If instead though you want to learn how to do ajax code yourself, one of the best resources that we can show you is the Bulletproof Ajax book, which also makes all of the code and working examples freely available from the book.
    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
  •