CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 highlighting search text

Print topic Send  topic

Author Message
romax

Posts: 5
Posted: 09/21/2004, 5:40 AM

I am sure this is posted somewhere but I can not find it. I want to replace all occurrences of the keyword in the results with a highlighted keyword. I am not exactly sure how to do this.

Can somewhere post a code sample to get me started?

Thanks.
View profile  Send private message
DonB
Posted: 09/21/2004, 7:25 AM

I have one in my download section: "Color-coded HTML text"

--
DonB

http://www.gotodon.com/ccbth


"romax" <romax@forum.codecharge> wrote in message
news:641502132b0629@news.codecharge.com...
> I am sure this is posted somewhere but I can not find it. I want to
replace all
> occurrences of the keyword in the results with a highlighted keyword. I
am not
> exactly sure how to do this.
>
> Can somewhere post a code sample to get me started?
>
> Thanks.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

romax

Posts: 5
Posted: 09/22/2004, 8:29 AM

Ok I tried to use your solution and I can not get it to work. Can you provide a little more insight on how to use it?

I used the After Initialize and Before unload but kept getting errors that the objKW could not be found.

I am trying to do a search with two variables s_QUESTION and s_ANSWER

So I set these two equal to the following lines:

Set QUESTION = CCCreateField("QUESTION", "QUESTION", ccsText, Empty, Recordset)
QUESTION = objKW.HTML(QUESTION ,"")

Any thoughts?
View profile  Send private message
csydow


Posts: 22
Posted: 04/03/2005, 4:01 AM

I put this code into the BeforeShow of my grid:

Dim txt
txt=Request.QueryString("s_keyword")

pages.content.value=Replace (pages.content.value,txt,"<font color=BLUE><i><b>" & txt & "</i></b></font>")

**s_keyword comes from a search
**pages.content.value is the label being searched (must be in html mode)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.