Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Need your help!

Options
  • 15-11-2007 10:46am
    #1
    Closed Accounts Posts: 14


    Hi guys,

    Really quick question here.

    Does anyone know whats the best way of approaching trying to create dynamic text boxes similar to the search box on Yahoo (www.yahoo.com)?

    When you type into the search box at the top of the page, and then click the little arrow beneath it, it dynamically shows you what your search is matching to? I need to do something similar just taking values out of a Database.

    I think it might be AJAX, does anyone have any ideas/best way of approaching this? Also any good reading you guys know of would be great!

    Cheers!


Comments

  • Registered Users Posts: 500 ✭✭✭warrenaldo


    This sounds very straight forward. maybe im not fully nderstanding problem.
    But you want a textbox - when you type in and click enter it will search for all files/records or whatever that match. then it will display???

    Is that it?


  • Registered Users Posts: 3,594 ✭✭✭forbairt


    Good reading =

    Head Rush Ajax (pretty basic but fun)
    More Advanced = Ajax In Action ... very good book in my opinion

    Anyways if its online reading you're after you could have a look at ...

    http://www.dynamicajax.com/fr/AJAX_Suggest_Tutorial-.html


  • Registered Users Posts: 3,401 ✭✭✭randombar


    Yup ajax is the job,

    Basically you're passing variables to another page via javascript (eg the onkeyup command) and this page is passing the result back.

    All nicely done in the background.

    Got it working ok for one of my sites.


  • Registered Users Posts: 500 ✭✭✭warrenaldo


    Yes AJAX would probably be the best way - with its speed it would look seamless. But any server side language could really do an adequite job. Ive done similar jobs many times in java, ASP.NET and python and its more than adequite.


  • Registered Users Posts: 3,594 ✭✭✭forbairt


    warrenaldo wrote: »
    But any server side language could really do an adequite job. Ive done similar jobs many times in java, ASP.NET and python and its more than adequite.

    Server side languages won't update the current page as such ...

    hence he needs the javascript / ajax interaction with the server to display the dropdown as he's typing ..

    It doesn't really matter what server side language is passing back the results as you have said though :)


  • Advertisement
  • Registered Users Posts: 6,511 ✭✭✭daymobrew


    Lou33 wrote: »
    Does anyone know whats the best way of approaching trying to create dynamic text boxes similar to the search box on Yahoo (www.yahoo.com)?

    When you type into the search box at the top of the page, and then click the little arrow beneath it, it dynamically shows you what your search is matching to? I need to do something similar just taking values out of a Database.
    Yahoo! have published a lot of code on their Developer site. This feature might be available there.
    Yahoo! Search - All the Yahoo! Search Web services provide a REST interface. As with the Maps building block APIs you can use XMLHttpRequest to access these APIs, and get output in XML or JSON format.


Advertisement