CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Highlight search results

Print topic Send  topic

Author Message
Dorin

Posts: 50
Posted: 03/06/2013, 10:31 AM

Hello,

I use this code in the Before Show event of a grid to highlight the searched results:

Dim search
Dim Articles

search = Request.QueryString("art")
Articles = grid.Articles.value

Articles = Replace(Articles,search,"<font color='red'><b>" & txt & "</b></font>")

The Articles label's content is HTML.

What's wrong with the code? I've got no error but nothing is highlighted.

I searched the entire forum for some samples but I couldn't find anything to work.

Any help would be greatly appreciated.
View profile  Send private message
acaruson

Posts: 17
Posted: 03/31/2013, 10:30 PM

Try this...

Put the following code into the BeforeShow of the ELEMENT in the results or targeted grid. Obviously, change the table and search variables to match your code.


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

tbl_events.Event_Edit.value=Replace (tbl_events.Event_Edit.value,txt,"<font color=RED><i><b>" & txt & "</i></b></font>", 1, -1, vbTextCompare)
View profile  Send private message
Dorin

Posts: 50
Posted: 04/01/2013, 6:17 AM

Yeap, it works.

Thank you.
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.