SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    self refining select

    not sure where to post this so also in scripts forum........

    I am looking for some html /javascript/php code to emulate the selection fields seen in MS help , some e-mail programs etc.

    In an e-mail program it might for example refine the selection criteria for an email address as you enter each character of a name the selections available are progressively refined.

    e.g. if the following names were available

    Aaron
    Abba
    Abbas
    Abdul
    Abdel
    Abe
    Abel
    Abner
    Abraham
    Adair
    Adam
    Addison
    Adil
    Adrian
    Ahmed
    Ahmad
    Aidan
    Ainsley
    Ainslie
    Akmal

    pressing 'a' would give the complete list as a choice

    then pressing 'b' ====> 'ab'

    would give a choice of

    Abba
    Abbas
    Abdul
    Abdel
    Abe
    Abel
    Abner
    Abraham

    pressing 'b' =============> 'abb'

    would give the following choices

    Abba
    Abbas

    thanks to anyone who can help..........

  2. #2
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    There is a good example of this on w3schools' AJAX tutorial.

    http://www.w3schools.com/ajax/ajax_example_suggest.asp

    Look through the other parts of the tutorial to find out how to do it.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  3. #3
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by arkinstall View Post
    There is a good example of this on w3schools' AJAX tutorial.

    http://www.w3schools.com/ajax/ajax_example_suggest.asp

    Look through the other parts of the tutorial to find out how to do it.
    thanks not sure that my web skills are up to this but I will try.

    I really need the suggestions returned in a form so that the script can go on and call another php script

  4. #4
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Do you want it to update live, or do you want the page to refresh?

    Will it be fired at the press of a key, or the click of a button?
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  5. #5
    SitePoint Member
    Join Date
    Jul 2002
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I managed to get a little time to look at AJAX - not quite as daunting on a second look. I cannot get to the code until early next week I will probably get there.


    Do you want it to update live, or do you want the page to refresh?

    Will it be fired at the press of a key, or the click of a button?

    Not sure; It would be neat to update the entry field and have a button to link to another page -

    But I guess as a series of links (to another page) passing the value chosen as part of the link would be OK aswell.

    ? These links being rows of a <table>. ?

    thanks again Allan


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
  •