mottwsc Posted August 3, 2008 Share Posted August 3, 2008 I'm using PHP to render HTML and have a selection box with long text fields which are a combination of two fields (college name and location). An example of part of the selection box would be: Adelphi University - Garden City, NJ Adirondack Community College - Queensbury, NJ I'm trying to do two things, much like Facebook does them - (1) I would like the first line to say the college and the second (sub-line) the location, as in Adelphi University - Garden City, NJ Adirondack Community College - Queensbury, NJ (2) I'd like to allow users to select on more that just the first letter in the selection box, so if the user typed 'ad', the user would see colleges with 'ad' in the name and/or location (such as the two example colleges); if the user typed 'Queensbury', the user would see all of those colleges that had 'Queensbury' in the name and/or location. I'm assuming this requires JavaScript, but maybe it is something else or a combination of things. Can someone provide any guidance or point to examples on either or both of these? Thanks! Michael Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 3, 2008 Share Posted August 3, 2008 Sounds like you would have to build somethign from scratch. I can't think of any way to customize a standard select list to do that. You are also making multiple requests. One would be about creating a multi-line select list and second would be a search capability. The fist would be done with a combination of CSS and DHTML, the second could be accomplished with just JavaScript or with AJAX. In any event, you are asking for someone to provide the whole ball of wax. If you want that, then you should post in the freelancing forum and perhaps someone would be willing to do it for compensation. Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted August 3, 2008 Share Posted August 3, 2008 In any event, you are asking for someone to provide the whole ball of wax. If you want that, then you should post in the freelancing forum and perhaps someone would be willing to do it for compensation. I'm pretty sure all he typed was: I'm assuming this requires JavaScript, but maybe it is something else or a combination of things. Can someone provide any guidance or point to examples on either or both of these? doesn't seem to me like he's asking for any code at all. Here's my input. Do you use firefox? If not get it. If so, download the stumble application. And stumble things web programming-related. I had a bunch bookmarked, but lost the bookmarks(dont ask) but I remember stumbling across tons of ajax websites that give you code for tons of different methods, one of which being the auto-complete facebook-esque thing you're looking for. Quote Link to comment Share on other sites More sharing options...
mottwsc Posted August 3, 2008 Author Share Posted August 3, 2008 mjdamato - Thanks for your suggestions. I'm not looking for someone to custom-code this for me. I am looking for snippets, examples, functions, etc. that others know about that do similar things. I'd also prefer to be able to do this - if possible - using one thing: JavaScript or Ajax or whatever (less to learn, maintain). If not, then so be it. dannyb785 - Thanks for the suggestion on web searching. I'll look into it. Sounds like AJAX might do the trick. I'm also open to other suggestions, since I'm not set on a particular language outside of PHP. If I could do it with PHP, that would be great, but I don't think so. Quote Link to comment Share on other sites More sharing options...
Psycho Posted August 4, 2008 Share Posted August 4, 2008 Just an FYI: AJAX is a combination of JavaScript AND a server-side language such as PHP. Plus, what you are wanting will require at least a general knowledge of CSS (aka Style Sheets). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.