Search function - upper and lower letters

O

Omicron

Hello,
I have written the following small "database" program using
Microsoft's Tabular Data Control (TDC) and some Javascript:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SEARCH Experiment</title>
<SCRIPT LANGUAGE="javascript" type="text/javascript">
function justTitle_filter()
{
TDC1.FilterColumn="Title";
TDC1.FilterValue=newTitle.value;
TDC1.FilterCriterion="=";
TDC1.Reset();
}
</SCRIPT>
</head>

<body>
<h1>Microsoft Tabular Data Control (TDC) and Javascript Filtering</h1>

<!-- Show the entire database when page is first loaded or refreshed --<OBJECT ID=TDC1 CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"
WIDTH=0 HEIGHT=0>
<PARAM NAME=DataURL Value="database.txt">
<PARAM NAME=TextQualifier Value=",">
<PARAM NAME=UseHeader Value=True>
</OBJECT>
<!-- -->

<INPUT TYPE=BUTTON VALUE="Title Search - Enter In Box and Then Click
Here:" ONCLICK=justTitle_filter()>
<INPUT TYPE=TEXT ID=newTitle>

<p>
<table border="1" summary="Database Headings">
<tr>
<td width="112">TITLE</td>
<td width="60">COMP</td>
<td>B</td>
<td width="22">PG</td>
<td width="62">OWNER</td>
<td width="32">YR</td>
</table>

<TABLE ID=Table1 BORDER DATASRC=#TDC1 summary="Database Results">
<TBODY>
<tr>
<td width="112"><div datafld=title></DIV></TD>
<td width="60"><div datafld=composer></DIV></TD>
<td><div datafld=book></DIV></TD>
<td width="22"><div datafld=page></DIV></TD>
<td width="62"><div datafld=owner></DIV></TD>
<td width="32"><div datafld=year></DIV></TD>
</TR>
</TBODY>
</TABLE>

</body>
</html>

And the Database that it reads (which must be named database.txt) is
as follows:

Title,Composer,Book,Page,Owner,Year
Yellow Submarine,Beatles,2,235,Smith,1987
Tour's End,Stan Getz,4,15,Williams,1967
Got To Hurry,Yardbirds,2,435,Moore,1998
Last Dance,Summers,2,158,Rossmann,1987

All works fine.

However, when I use the SEARCH function as I have written it, I must
enter the search string in the same upper/lower case manner that the
database itself is written.
In other words, if I want to search for the sub-string "end", I must
enter it as "End" otherwise the search will yield no hit, because as
you can see from the database, the word 'end' is written with a
capital letter 'E'.
How can my search function be re-written so that it will find an
existing string regardless of whether the database entry was entered
with a capital letter or a lower case letter?

Thank you.
 
O

Omicron

Omicronschreef:


According to the msdn website, all you need to do is add the following:

TDC1.CaseSensitive = false;

http://msdn2.microsoft.com/en-us/library/ms531360(VS.85).aspx

JW

Thank you once again for the help on that question. Perhaps you assist
me once agin (if I may be so bold).
I'm trying to figure out how I could get the TOTAL NUMBER OF RECORDS
that are in Text file I create for the TDC to read? In other words,
I'd like to be able to denote, on the webpage that after the database
was displayed, that it contained 457 records (or whatever). As you
know, the text file used by the TDC is a CSV list. Each time I type a
new line of CSV data, I consider it a new record. Is there a way to
get a variable for the total number of records that I could bring to
the screen via HTML or ???
Thank you once again for your time and knowledge.
Oh, yes...I have been plowing through the Microsoft site at
http://msdn2.microsoft.com/en-us/library/
but haven't found what I think I'm looking for!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,531
Members
45,004
Latest member
KetoBoostGummies

Latest Threads

Top