OT! Sorry to clog this board. Dot Net question, Someone here always has an answer |
|
Porsche, and the Porsche crest are registered trademarks of Dr. Ing. h.c. F. Porsche AG.
This site is not affiliated with Porsche in any way. Its only purpose is to provide an online forum for car enthusiasts. All other trademarks are property of their respective owners. |
|
OT! Sorry to clog this board. Dot Net question, Someone here always has an answer |
Qarl |
Apr 24 2006, 03:43 PM
Post
#1
|
Shriveled member Group: Benefactors Posts: 5,233 Joined: 8-February 03 From: Florida Member No.: 271 Region Association: None |
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 |
lapuwali |
Apr 24 2006, 03:57 PM
Post
#2
|
Not another one! Group: Benefactors Posts: 4,526 Joined: 1-March 04 From: San Mateo, CA Member No.: 1,743 |
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. |
Rand |
Apr 24 2006, 03:58 PM
Post
#3
|
Cross Member Group: Members Posts: 7,409 Joined: 8-February 05 From: OR Member No.: 3,573 Region Association: None |
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:
type-ahead demo edit... oops, James beat me to it. (IMG:style_emoticons/default/laugh.gif) |
SirAndy |
Apr 24 2006, 04:06 PM
Post
#4
|
Resident German Group: Admin Posts: 41,679 Joined: 21-January 03 From: Oakland, Kalifornia Member No.: 179 Region Association: Northern California |
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: type-ahead demo edit... oops, James beat me to it. (IMG:style_emoticons/default/laugh.gif) (IMG:style_emoticons/default/agree.gif) client side scripting will do this for you, regardless of browser, .NET or backend ... piece of german black forest cake ... (IMG:style_emoticons/default/beerchug.gif) Andy |
dagdal1967 |
Apr 24 2006, 04:10 PM
Post
#5
|
What are YOU looking at... Group: Members Posts: 372 Joined: 13-March 03 From: Carrollton, Texas Member No.: 423 |
One word:
AJAX |
Qarl |
Apr 24 2006, 04:14 PM
Post
#6
|
Shriveled member Group: Benefactors Posts: 5,233 Joined: 8-February 03 From: Florida Member No.: 271 Region Association: None |
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! (IMG:style_emoticons/default/aktion035.gif) |
SirAndy |
Apr 24 2006, 04:15 PM
Post
#7
|
Resident German Group: Admin Posts: 41,679 Joined: 21-January 03 From: Oakland, Kalifornia Member No.: 179 Region Association: Northern California |
One word: AJAX i know some scripting code out there can be pretty messy, but you really think this is going to help? AJAX (IMG:style_emoticons/default/confused24.gif) (IMG:style_emoticons/default/biggrin.gif) Andy |
dagdal1967 |
Apr 24 2006, 04:18 PM
Post
#8
|
What are YOU looking at... Group: Members Posts: 372 Joined: 13-March 03 From: Carrollton, Texas Member No.: 423 |
i know some scripting code out there can be pretty messy, but you really think this is going to help? AJAX (IMG:style_emoticons/default/confused24.gif) (IMG:style_emoticons/default/biggrin.gif) Andy Better than the alternative... |
Rand |
Apr 24 2006, 04:20 PM
Post
#9
|
Cross Member Group: Members Posts: 7,409 Joined: 8-February 05 From: OR Member No.: 3,573 Region Association: None |
(IMG:style_emoticons/default/laugh.gif)
Hey, you guys are making me sentimental. I had to go dig up a picture of my pride and joy... . . . Attached image(s) |
Jeroen |
Apr 24 2006, 05:36 PM
Post
#10
|
914 Guru Group: Members Posts: 7,887 Joined: 24-December 02 From: The Netherlands Member No.: 3 Region Association: Europe |
|
Qarl |
Apr 25 2006, 03:04 PM
Post
#11
|
Shriveled member Group: Benefactors Posts: 5,233 Joined: 8-February 03 From: Florida Member No.: 271 Region Association: None |
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." |
Rand |
Apr 25 2006, 03:08 PM
Post
#12
|
Cross Member Group: Members Posts: 7,409 Joined: 8-February 05 From: OR Member No.: 3,573 Region Association: None |
(IMG:style_emoticons/default/bs.gif)
Nothing goes back to the server until the form is submitted. The type-ahead is ALL client side. |
SirAndy |
Apr 25 2006, 03:09 PM
Post
#13
|
Resident German Group: Admin Posts: 41,679 Joined: 21-January 03 From: Oakland, Kalifornia Member No.: 179 Region Association: Northern California |
>>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." (IMG:style_emoticons/default/WTF.gif) please consider your programmer to be clueless ... *client* side scripting is called *client* side because it all happens on the *clients* browser. no talking back to the server needed ... workflow: get all entries for your dropdown from server, fill in dropdown box. add input box for user input. when user types in input box, use *client* side JavaScript to loop through the entires in the dropdown list to find the next best match, highlight that match. this can be done interactive, every time the input box changes (user typing) you do a quick run on the dropdown list, no need for any "go" button or such ... really not all that difficult. if your programmer can't do it, PM me and i'll have a look at it ... (IMG:style_emoticons/default/type.gif) Andy |
lapuwali |
Apr 25 2006, 03:51 PM
Post
#14
|
Not another one! Group: Benefactors Posts: 4,526 Joined: 1-March 04 From: San Mateo, CA Member No.: 1,743 |
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.
|
SirAndy |
Apr 25 2006, 04:30 PM
Post
#15
|
Resident German Group: Admin Posts: 41,679 Joined: 21-January 03 From: Oakland, Kalifornia Member No.: 179 Region Association: Northern California |
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. yes, but only if we're talking 1000+ entries in the dropdown, at which point you should really re-design your user-interface anyways. ever tried to find something in a dropdown with over 1000 entries? (IMG:style_emoticons/default/blink.gif) Andy PS: that's why GUI design is a art in itself. if you have that many entries, break it down in smaller chunks, make 2 or more dropdowns that depend on each other. like, the first selects the country, the second the state, the third the city, by then, you're down to a managable size list ... |
Qarl |
Apr 25 2006, 04:51 PM
Post
#16
|
Shriveled member Group: Benefactors Posts: 5,233 Joined: 8-February 03 From: Florida Member No.: 271 Region Association: None |
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. |
Rand |
Apr 25 2006, 05:03 PM
Post
#17
|
Cross Member Group: Members Posts: 7,409 Joined: 8-February 05 From: OR Member No.: 3,573 Region Association: None |
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. |
lapuwali |
Apr 25 2006, 05:06 PM
Post
#18
|
Not another one! Group: Benefactors Posts: 4,526 Joined: 1-March 04 From: San Mateo, CA Member No.: 1,743 |
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. |
SirAndy |
Apr 25 2006, 05:19 PM
Post
#19
|
Resident German Group: Admin Posts: 41,679 Joined: 21-January 03 From: Oakland, Kalifornia Member No.: 179 Region Association: Northern California |
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. while i agree that this would be "neat", 260 choices is not all that much ... it'll be easier and *faster* to just download the whole array once when the page loads and then do a quick javascript selection ... as i said before, easy as pie. piece of cake. no problemo. (IMG:style_emoticons/default/type.gif) Andy |
Rand |
Apr 25 2006, 05:25 PM
Post
#20
|
Cross Member Group: Members Posts: 7,409 Joined: 8-February 05 From: OR Member No.: 3,573 Region Association: None |
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.
|
Lo-Fi Version | Time is now: 10th June 2024 - 12:23 AM |
All rights reserved 914World.com © since 2002 |
914World.com is the fastest growing online 914 community! We have it all, classifieds, events, forums, vendors, parts, autocross, racing, technical articles, events calendar, newsletter, restoration, gallery, archives, history and more for your Porsche 914 ... |