Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Highlighting
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Highlighting

 Post Reply Post Reply
Author
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Topic: Highlighting
    Posted: 16 April 2005 at 2:28pm
I want to highlight some words when reading from database, i use this simple script to read:
<%
sql = "SELECT * FROM TableName"
 
set r = Server.CreateObject("Adodb.Recordset")

r.open sql, Conn, 1, 3

Response.Write ""&r("username")&"<br>"

r.close : Set r = nothing
%>
 
how can i Highlight some certain characters within r("username") based on a querystring
 
Thanks.


Edited by zMaestro - 16 April 2005 at 2:28pm
Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 16 April 2005 at 2:31pm
are you wanting to use like a search function where if the username contains the letters within a querystring highlight that?

if so have a look at the forum search page, it does that exact thing.
Back to Top
zMaestro View Drop Down
Senior Member
Senior Member


Joined: 11 May 2003
Location: Egypt
Status: Offline
Points: 1183
Post Options Post Options   Thanks (0) Thanks(0)   Quote zMaestro Quote  Post ReplyReply Direct Link To This Post Posted: 17 April 2005 at 7:57pm
i looked at it, but didn't know how to implement it, it was a sub function in the header of the file, i'm looking for the simplest way implemening it Embarrassed
Back to Top
C.P.A. View Drop Down
Newbie
Newbie


Joined: 26 April 2005
Location: Netherlands
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote C.P.A. Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2005 at 10:27am
you could simply convert the 'to highlight text' into a string and take a replace function to search for that word or words and replace them with <span class="highlight">that word</span> and it will highlight the words.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.