Dear All I am working with selection of a some variables using a drop-down menu. However, with the increasing number of variables, the users find it difficult to select a value from the drop-down menu (the menu contains 1000+ options and is expected to grow to 20,000+ very soon). The values are submitted from a PHP form to MySQL database. Now, I would like to shift to some other option than a drop-box (users find it very uncomfortable to select from the long drop-down list). Can someone suggest me a way to enter the text in a textbox as it appears on the URL http://www.ncbi.nlm.nih.gov/entrez/query/static/citmatch.html Type "tuberculosis" (without quotes) in the first text-box (named Journal) and you will understand what I want..... Thanks in advance. Regards RPS
it's just a live search that queries the database upon entering a character and then returns rows matching what is currently in the textbox using ajax and then outputs it to a div that is positioned directly below the text box with the overflow property set to auto making it appear as a dropdown list when really all it is, is a div with a scroll bar. hope that this helps some. if anything, pm me and we can discuss it further.
prototype.js and JSON.php make ajax easy. If you intend to make complex web-sites, you'll need to become familiar with those tools.
and then your users have 800kb of javascript to download instead of about the actual 8 that it takes to make something like this work. (numbers were estimated). frameworks are fine and all, but if you only need to do something like this, it's just unnecessary bloat.
prototype is a plug and play 57KB script. And it does a heck of a lot more than just AJAX. It's cross browser compatible for everything. Instead document.getElementByID you use $(elementID) which works on every browser. JSON.php is a plug and play 34KB script that allows you do do things like $json = new Services_JSON(); header('X-JSON: ('.$json->encode(array("status"=>1)).')'); exit() Code (markup): and then in javascript new Ajax.Request('index.php', { method: 'get', parameters: "param=" + id, onComplete: function(transport, json) { if(json['status'] == 1) { alert("yay!") } } }); Code (markup): I highly recommend learning about these tools that already exist instead of insisting on doing it "your" way. You'd save a lot of time and headaches trying to get things to work.
the fact of the matter is that that you do not need to be familiar with prototype.js or json.php to create complex web applications. granted that you actually take the time to learn what you are doing instead of taking shortcuts your whole life and then calling yourself a developer when clearly you're just doing "plug-and-play" applications based on someone else's code. javascript and javascript object notation really isn't that difficult to learn. give it a try, you might learn something. and like i said, you have 91kb of crap to download when in reality it shouldn't take less than 10. unnecessary bloat...
*pats ansi on the head* You're so cool. http://www.dawnofthegeeks.com/software_rendering/index.php?section=js&page=tutorial Do you have any other questions about what I do and do not know? http://www.dawnofthegeeks.com/software_rendering/index.php?section=main One of these days you'll grow up to be a real programmer and realize that just because you can, doesn't mean you need to. So what you're trying to convince us all of is that you think a browser downloads the source to a PHP script when you include a PHP script in your web-site. Interesting theory about how server side scripting languages work.
all i am saying is that it is unnecessary to use a framework for something this simple. and no, a browser does not download a php script, it downloads the output. it does however download the javascript to the client side. one of these days you'll learn to be a programmer without the use of a 3rd party framework and then you'll be cool like me. you said it, not me