First, my apologies for clogging the 914club forum with this. However, there are enough programming geeks here to usually solve my problems.
Here is what I need help with.
I have been having someone design a web-application for me.
The web application is designed using Microsoft .net framework 1.1.
It has a Microsoft SQL back end and requires Internet Explorer (due to some of the Active X controls)
Part of my application involves choosing data from drop-down lists that contain hundreds of numerical codes.
Does anyone know if tjere is a way to make the drop down lists "smart" using dot net and the web browser? Whereby you can begin typing the first few characters of the data you want from the drop down list and the drop down list automatically takes you to the code in the list that matches. I believe it's called "smart find"
Microsoft Access does this with their drop down lists.
Right now, I believe that .net and Internet Explorer are intelligent only for the first character. (i..e, it matches only the first character).
If you know a .net website that I can demonstrate this, or know of the code to implement this, please let me know.
I would be most grateful.
Regards,
Karl
The traditional way to do this is with Javascript aka ECMAscript, and it's perfectly doable with any programming environment, as Javascript is easy to generate. However, if they're using ActiveX controls, you can do this kind of thing with ActiveX, too. Me, I'd insist on NOT using ActiveX, but using Javascript instead, as that as a better potential for being browser neutral. IE is losing market share to Firefox...
If this is strictly an "in-house" kind of application, then requiring IE is no big deal. If this is going to be a big public website, however, I'd ditch ActiveX. Not only is it IE specific, but it's highly prone to security problems.
That would be a client-side function run at the browser end. Typically that would be done with Javascript, but since you are already limited to IE it could be done with VBScript. Here is an example:
http://www.formassembly.com/type-ahead/
edit... oops, James beat me to it.
One word:
AJAX
I found this too..
http://abstractvb.com/downloads/autocombo.asp
I was hung up on the "smart find" verbiage. Once you told me "type ahead", I have been finding all sorts of stuff.
You guys rock!
Hey, you guys are making me sentimental. I had to go dig up a picture of my pride and joy...
.
.
.
Attached image(s)
I gave the programmer some of the following information...
>>Here is the page. It includes source code. It uses the .net Autocombo box...
http://abstractvb.com/downloads/autocombo.asp
I found another version of this with some different source code...
http://www.formassembly.com/type-ahead/
Please look at the page above. If you click the target box, and start typing text, it will narrow the text down based on what you type.
Here is another company that offers an add-in module for .net applications
http://www.hallogram.com/gridex/gridexnet/<<
His response...
>>Please consider when ever user types into the page, the application has to post back to the server and redraw the screen. This can slow down functionality."
Nothing goes back to the server until the form is submitted. The type-ahead is ALL client side.
There's a couple of ways to do this, really. If there's a LOT of data, it may be quite expensive to hand it all to the client on the first load. So, you hand it the first "rank" of data, then request the second "rank" when you know what it is. Repeat as necessary. You're trading off immediate response time with total response time, but the second method usually results in a better user experience when there's lots of data.
That's the issue.
In one area of the application, one list has 175+ choices, the other has 260+ choices
We're inputting data based upon something marked on a piece of paper. We know the data item we want to select.
It's all numerical codes
078.10
078.19
077.72
098.12
There are dozens and dozens of codes in the lists that begin with each digit 0-9.
Even just entering the first digit, then you have to scroll down through dozens of choices that begin with that digit. Type-ahead will work great because we already know specifically what we want.
There are other areas of our appplication that are from lists of insurance carriers.
We might have hundreds of insurance carrier names to begin with.
Aetna, Allstate, Allheath. Aarons Insurance.
We're trying to narrow down the list by entering what we know.. the first 3-4 characters.
You want the drop-down list to shrink to fewer options as you go... Now I see why the programmer mentioned round-trips. But still, it would be better to load the whole array of options once, then use client-side code to dynamically shrink the list.
I'm not sure that a pick-list is the correct way to go, given that many options.
This is unfolding more as we go, and that leads me to say we probably won't be able to give you the ultimate solution this way... the whole interface needs to be designed with the whole scope understood.
Exactly, so if you can narrow the field from 500 to 50 in the first character, then transmitting all 500 is a waste of time. Have enter the first char, then the client requests the list of 50 to display. If you can go from 500 to 5 in two characters, then don't make the request until they type two characters. All depends on your data.
You could be extra clever and even rank the results by popularity, so the first two characters return a list in order of most likely to be used.
Agreed. You do NOT want to be doing a server round-trip in the middle of someone typing. Much better to load the whole array once than interrupt someone's typing to reload a page, making them wonder WTF is going on.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)