I have a combobox on this testsite: sneleopard.dk/combobox.html
it should show all records containing the search string while typing.
But sometimes it only shows some of them, why?
1) type "spi" and it shows among others "spinat helbladet"
2) delete the search string and type "bla"
3) it should now among others show "spinat helbladet" again, but it
doesnt, why?
maybe its because that the function shows first records starting with
the search string, and thereafter those containing? 4 1243
On Sat, 03 Mar 2007 07:54:00 +0100, hygum <th*********@gmail.comwrote:
I have a combobox on this testsite: sneleopard.dk/combobox.html
it should show all records containing the search string while typing.
But sometimes it only shows some of them, why?
1) type "spi" and it shows among others "spinat helbladet"
2) delete the search string and type "bla"
3) it should now among others show "spinat helbladet" again, but it
doesnt, why?
maybe its because that the function shows first records starting with
the search string, and thereafter those containing?
It's a problem with the commas. Try it with "baby" or "frisk": you won't
find "spinat, baby, frisk".
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
On 3 Mar., 08:27, OmegaJunior <omegajun...@spamremove.home.nlwrote:
On Sat, 03 Mar 2007 07:54:00 +0100, hygum <thomashy...@gmail.comwrote:
I have a combobox on this testsite: sneleopard.dk/combobox.html
it should show all records containing the search string while typing.
But sometimes it only shows some of them, why?
1) type "spi" and it shows among others "spinat helbladet"
2) delete the search string and type "bla"
3) it should now among others show "spinat helbladet" again, but it
doesnt, why?
maybe its because that the function shows first records starting with
the search string, and thereafter those containing?
It's a problem with the commas. Try it with "baby" or "frisk": you won't
find "spinat, baby, frisk".
--
Using Opera's revolutionary e-mail client:http://www.opera.com/mail/
yes I do. With baby or frisk i find that record. The commas are
escaped in the javascript array. But still it can be a comma
problem... I will try without
On Mar 3, 8:54 am, "hygum" <thomashy...@gmail.comwrote:
I have a combobox on this testsite: sneleopard.dk/combobox.html
it should show all records containing the search string while typing.
But sometimes it only shows some of them, why?
1) type "spi" and it shows among others "spinat helbladet"
2) delete the search string and type "bla"
3) it should now among others show "spinat helbladet" again, but it
doesnt, why?
I changed your function, so that the array search is done once in one
loop only and it gives me none of the problems above. -
for(i = 0; i < functionListLength; i++)
-
{
-
if( ( functionlist[i].search(re1) >= 0 ) ||
-
( functionlist[i].search(re2) >= 0 ) )
-
{
-
selectObj[numShown] = new Option(functionlist[i],comboids[i]);
-
numShown++;
-
}
-
}
-
You will have to clean up the variables not used, like
"visteelementer".
In my opinion you can leave out the first criteria (first search) as
the second criteria will find also those who starts with the search
string!
Best wishes,
John, Latvia
On 5 Mar., 11:17, "j.andersen" <j.andersen...@gmail.comwrote:
On Mar 3, 8:54 am, "hygum" <thomashy...@gmail.comwrote:
I have a combobox on this testsite: sneleopard.dk/combobox.html
it should show all records containing the search string while typing.
But sometimes it only shows some of them, why?
1) type "spi" and it shows among others "spinat helbladet"
2) delete the search string and type "bla"
3) it should now among others show "spinat helbladet" again, but it
doesnt, why?
I changed your function, so that the array search is done once in one
loop only and it gives me none of the problems above.
-
for(i = 0; i < functionListLength; i++)
-
{
-
if( ( functionlist[i].search(re1) >= 0 ) ||
-
( functionlist[i].search(re2) >= 0 ) )
-
{
-
selectObj[numShown] = new Option(functionlist[i],comboids[i]);
-
numShown++;
-
}}
-
You will have to clean up the variables not used, like
"visteelementer".
In my opinion you can leave out the first criteria (first search) as
the second criteria will find also those who starts with the search
string!
Best wishes,
John, Latvia
i know the second search find the same as the first (but not the
reverse), but thats because i want the list to be first the records
that begins with the search string, and thereafter the records that
contains.
Thanks for your help This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jorge Godoy |
last post by:
Hi.
I have created an interface where I have a QDataBrowser and all of its
editing and navigating controls and one of the displayed controls is in a
QSpinBox.
I have the navigation from...
|
by: maddman |
last post by:
I have an odd problem with my database, and was hoping someone could
point me at the problem.
We have an access database that is used by several people to input
data. Users have reported some...
|
by: Alpha |
last post by:
This is a Window based application. How do I get my combox listing to
display in sorted order by DataMember? I inserted a blank row to the dataset
table which is the datasrouce for the comboBox...
|
by: Greg McKnight |
last post by:
This may be the second time this post is showing, I accidentally shut
down my browser.
Sorry if it is a repeat.
I am a newbie to VB.net, so please forgive me if these are simple
questions.
...
|
by: Bob |
last post by:
The scenario is that of the employees table wherein there's an EmployeeId
and a ReportsTo field in the same table. The combobox is one in a datagrid
view that lets you select an employee from the...
|
by: Timbo |
last post by:
Hi there,
I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2.
My first table is a table containing all the Tickets I got. The field ”Ticket”...
|
by: radink |
last post by:
Hey All,
I have a report that I would like to show a word on based on if a
field is checked in a form. For example. The form has a check box
called Fee. If that is checked, I want the word Paid...
|
by: aaron5150 |
last post by:
OK so here goes.
I have created a table for my "employees details" including "employee number". I have also completed another table which shows orders by "employee number", details of order etc.
...
|
by: Thomas Arthur Seidel |
last post by:
Hello to all,
I have a small or big problem with a customer data base, where during a change of
system we might have created duplicate records. This should be easy to find, you
might think, but,...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |