We have a simple html page that contains a long list of documents that users
can hyperlink to. The entries are currently in alphabetical order and we
would like to implement some type of page search instead of requiring users
to go to Edit, Find, and type in the search. I am very new to ASP but
suspect that this is possible. We would simply like to have a SEARCH box at
the top of the page and it allows users to search only the current page for
words. We simply want something a little more eloquent than the built in IE
page search. Any ideas are appreciated.
Thanks,
Fred 3 1616
You want them to be able to search on a page that has already loaded on the
client? Then you want JavaScript, not ASP. ASP no longer exists once the
page is rendered on the client, so can't be a vehicle for client-side
activity.
If you store the document links in a database, you could search against a
database, but this is no more convenient than edit/find because you have to
go back to the server for that.
--
Aaron Bertrand
SQL Server MVP http://www.aspfaq.com/
"Fred Yarbrough" <fc*********@yahoo.com> wrote in message
news:#$**************@TK2MSFTNGP12.phx.gbl... We have a simple html page that contains a long list of documents that
users can hyperlink to. The entries are currently in alphabetical order and we would like to implement some type of page search instead of requiring
users to go to Edit, Find, and type in the search. I am very new to ASP but suspect that this is possible. We would simply like to have a SEARCH box
at the top of the page and it allows users to search only the current page
for words. We simply want something a little more eloquent than the built in
IE page search. Any ideas are appreciated.
Thanks, Fred
Aaron,
I thought that this could be saved as an ASP page and then scripted to
check upon submission of the Search button to see if the option was
populated. If so then it would return some filtered result set of links.
If they did not search then they would simply see all of the links and could
pick one.
I will look into the JavaScript option. I am really clueless with the
Java stuff but I will see what is out there.
Thanks Aaron,!
Fred
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... You want them to be able to search on a page that has already loaded on
the client? Then you want JavaScript, not ASP. ASP no longer exists once the page is rendered on the client, so can't be a vehicle for client-side activity.
If you store the document links in a database, you could search against a database, but this is no more convenient than edit/find because you have
to go back to the server for that.
-- Aaron Bertrand SQL Server MVP http://www.aspfaq.com/
"Fred Yarbrough" <fc*********@yahoo.com> wrote in message news:#$**************@TK2MSFTNGP12.phx.gbl... We have a simple html page that contains a long list of documents that users can hyperlink to. The entries are currently in alphabetical order and
we would like to implement some type of page search instead of requiring users to go to Edit, Find, and type in the search. I am very new to ASP but suspect that this is possible. We would simply like to have a SEARCH
box at the top of the page and it allows users to search only the current page for words. We simply want something a little more eloquent than the built
in IE page search. Any ideas are appreciated.
Thanks, Fred
You could use ASP code like this below, where you create the table entries
based on an array of data, filtered by the user's search parameters. In
this case, the page starts showing all entries. If the user entires
something like "F" to search, only those entries with an "F" are displayed.
-rwg
<%
dim Words, Links, Idx, SearchAction
Words = array( "First Listing", "Second Listing", "Third not First " )
Links = array( "www.microsoft.com", "support.microsoft.com",
"msdn.microsoft.com" )
SearchAction = Request.form( "SearchData" )
if SearchAction <> "" then
SearchAction = trim( SearchAction )
end if
%>
<HTML>
<Form method="POST" name="MyForm" >
<TABlE ALIGN="CENTER" border=1>
<TR>
<TD>Search:</TD>
<TD><INPUT TYPE="TEXT" NAME="SearchData">
</TD>
<TD><INPUT TYPE="SUBMIT" value="Search" name="SearchIt"> </TD>
<%
for Idx = 0 to UBound( Words ) step 1
if SearchAction = "" or Instr( 1, Words(Idx), SearchAction,
vbTextCompare ) <> 0 then
Response.write( "<TR><TD>" & Words(Idx) & "</TD><TD>" & Links(Idx) &
"</TD><TR>" )
end if
next
%>
</TABLE>
</FORM>
</HTML>
</BODY>
</HTML> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Haines Brown |
last post by:
Re. <title>, my impression has been that a line break is _NOT_ allowed
in the contained text. Is that true? Also, I gather a double quotation
mark in the text string (and ampersand, etc.) _IS_...
|
by: timothy ma and constance lee |
last post by:
Sir
I have the simple question as follows:
I got three pages a,b,c point to same page d when clicking submit.
Is there any way, by using JavaScript to trace back which page a or b or c
to...
|
by: Tom wilson |
last post by:
I have created a very simple example that doesn't work. Form1
contains a textbox and a button:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles...
|
by: Roy |
last post by:
I'm assuming this is amazingly simple and I'm just missing the boat.
On the html side of an asp.net page I have a datagrid, a "search"
button, and 8 text boxes for search criteria. A user enters...
|
by: Paulo da Silva |
last post by:
Hi!
I was told in this NG that string is obsolet. I should use
str methods.
So, how do I join a list of strings delimited by a given
char, let's say ','?
Old way:
|
by: leafgreen |
last post by:
Hey everyone. Thanks for helping me with these two super-simple newbie questions. I use DW8.
1. On this page http://adswebsite.net/yahoo-search-versus-google-adwords, on the right column where it...
|
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= |
last post by:
Hi
I have a search page which display a grid of master records. Those records
that have children have a hyperlink that takes the user to the Details page
for that record.
How can I implement...
|
by: Andrew |
last post by:
I'm learning PHP so this might be a simple question to more expeienced
developers hopefully.
I have a findrecords.php page which has the following code which creates a
new record in a database...
|
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
| |