Ask a Question related to ASP Database, Design and Development.
-
Laphan #1
Jargon highlighter
Hi All
I've seen quite a number of ASP sites that highlight certain keywords in a
page and sometimes these words are links so that you can read the definition
on them, eg ADSL is highlighted in a page of text and if you click on it
then it takes you to a page explaining what this means.
Not 100% sure, but it looks like the whole thing is updated by the user via
CMS so how on earth do they create this jargon highlighter.
I can understand what's needed from a DB perspective, eg field for the word
and field for the definition, but how on earth do I find and highlight this
word in a page of normal text?
Any ideas on how to do this?
Rgds
Laphan
Laphan Guest
-
Colour settings for Highlighter Tool and Underline Text Tool
I am using ACROBAT STD 7.0.1 on Tiger. As I often read scientific PDF files, I would like to use additional colours for the Highlighter (yellow)... -
Highlighter Colors
Help! I am a student, and for an assignment- I need to highlight in at least five different highlight colors. I have a MAC and Adobe... -
Highlighter tool
I have highlighted some text in a PDF document. The color is about 60% gray and looks great on the screen, however, when I print the document, the... -
PHP/HTML web syntax highlighter available
I've released the first proper version of my PHP/HTML syntax highlighter. This program takes HTML from a URL or a file, syntax highlights it and... -
McKirahan #2
Re: Jargon highlighter
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:41084b49_3@127.0.0.1...definition> Hi All
>
> I've seen quite a number of ASP sites that highlight certain keywords in a
> page and sometimes these words are links so that you can read thevia> on them, eg ADSL is highlighted in a page of text and if you click on it
> then it takes you to a page explaining what this means.
>
> Not 100% sure, but it looks like the whole thing is updated by the userword> CMS so how on earth do they create this jargon highlighter.
>
> I can understand what's needed from a DB perspective, eg field for thethis> and field for the definition, but how on earth do I find and highlight> word in a page of normal text?
>
> Any ideas on how to do this?
>
> Rgds
>
> Laphan
Perhaps this?
<html>
<head>
<title>hilite.htm</title>
<style type="text/css">
..hilite { background:yellow; text-decoration:none }
</style>
</head>
<body>
This text is <a href="http://www.google.com/"
class="hilite">highlighted</a>.
</body>
</html>
McKirahan Guest
-
Laphan #3
Re: Jargon highlighter
Dear McKirahan
Thanks for coming back to me.
Yes, I can do as you have suggested, but this is a manual process.
How can I do what you have suggested for a set of user-definable/entered
words that are stored in a DB?
Toying with the idea of retrieving the keywords (from the DB) and putting
them in some form of Javascript array thingy, but not sure yet.
I don't want to go down the route of storing all textual content in the DB
or raw FileSys hacking, but this may be the only way I suppose.
Rgds
Laphan
McKirahan <News@McKirahan.com> wrote in message
news:BrYNc.188016$JR4.56153@attbi_s54...
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:41084b49_3@127.0.0.1...definition> Hi All
>
> I've seen quite a number of ASP sites that highlight certain keywords in a
> page and sometimes these words are links so that you can read thevia> on them, eg ADSL is highlighted in a page of text and if you click on it
> then it takes you to a page explaining what this means.
>
> Not 100% sure, but it looks like the whole thing is updated by the userword> CMS so how on earth do they create this jargon highlighter.
>
> I can understand what's needed from a DB perspective, eg field for thethis> and field for the definition, but how on earth do I find and highlight> word in a page of normal text?
>
> Any ideas on how to do this?
>
> Rgds
>
> Laphan
Perhaps this?
<html>
<head>
<title>hilite.htm</title>
<style type="text/css">
..hilite { background:yellow; text-decoration:none }
</style>
</head>
<body>
This text is <a href="http://www.google.com/"
class="hilite">highlighted</a>.
</body>
</html>
Laphan Guest
-
McKirahan #4
Re: Jargon highlighter
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:41086700$1_3@127.0.0.1...[snip]> Dear McKirahan
>
> Thanks for coming back to me.
>
> Yes, I can do as you have suggested, but this is a manual process.
>
> How can I do what you have suggested for a set of user-definable/entered
> words that are stored in a DB?
>
> Toying with the idea of retrieving the keywords (from the DB) and putting
> them in some form of Javascript array thingy, but not sure yet.
>
> I don't want to go down the route of storing all textual content in the DB
> or raw FileSys hacking, but this may be the only way I suppose.
>
> Rgds
>
> Laphan
>
Here's one approach; test as-is; watch for word-wrap.
It requires that JavaScript be enabled on the client.
Also, some words may be problematic such as "span".
<html>
<head>
<title>hilites.htm</title>
<script type="text/javascript">
var s = 0;
var word = new Array();
word[s++] = "one";
word[s++] = "two";
word[s++] = "three";
function hilites() {
var span = "<span class='hilite'>~</span>";
var temp;
var what = document.getElementById("hiliter").innerHTML;
for (var i=0; i<word.length; i++) {
var len = word[i].length;
var pos = what.toLowerCase().indexOf(word[i]);
if (pos >= 0) {
temp = what.substr(0,pos) +
span.replace(/\~/,what.substr(pos,len)) + what.substr(pos+len,what.length);
what = temp
}
}
document.body.innerHTML = what;
}
</script>
<style type="text/css">
..hilite { background:yellow; text-decoration:none }
</style>
</head>
<body onload="hilites()">
<span id="hiliter">
One, Two, Three, Four ...
</span>
</body>
</html>
McKirahan Guest
-
Mark Schupp #5
Re: Jargon highlighter
can you give an example site?
--
Mark Schupp
Head of Development
Integrity eLearning
[url]www.ielearning.com[/url]
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:41084b49_3@127.0.0.1...definition> Hi All
>
> I've seen quite a number of ASP sites that highlight certain keywords in a
> page and sometimes these words are links so that you can read thevia> on them, eg ADSL is highlighted in a page of text and if you click on it
> then it takes you to a page explaining what this means.
>
> Not 100% sure, but it looks like the whole thing is updated by the userword> CMS so how on earth do they create this jargon highlighter.
>
> I can understand what's needed from a DB perspective, eg field for thethis> and field for the definition, but how on earth do I find and highlight> word in a page of normal text?
>
> Any ideas on how to do this?
>
> Rgds
>
> Laphan
>
>
Mark Schupp Guest
-
Jeff Cochran #6
Re: Jargon highlighter
On Thu, 29 Jul 2004 02:00:29 +0100, "Laphan" <news@DoNotEmailMe.co.uk>
wrote:
Could be just smart tags, or a variation thereof, though that would be>I've seen quite a number of ASP sites that highlight certain keywords in a
>page and sometimes these words are links so that you can read the definition
>on them, eg ADSL is highlighted in a page of text and if you click on it
>then it takes you to a page explaining what this means.
client-side. Otherwise, the text is parsed through and links added
based on a glossary. Try:
[url]http://www.aspin.com/func/search?tree=aspin&qry=glossary&cat=pr&x=40&y=9[/url]
Jeff
Jeff Cochran Guest
-
Chris Hohmann #7
Re: Jargon highlighter
"Laphan" <news@DoNotEmailMe.co.uk> wrote in message
news:41084b49_3@127.0.0.1...definition> Hi All
>
> I've seen quite a number of ASP sites that highlight certain keywords in a
> page and sometimes these words are links so that you can read thevia> on them, eg ADSL is highlighted in a page of text and if you click on it
> then it takes you to a page explaining what this means.
>
> Not 100% sure, but it looks like the whole thing is updated by the userword> CMS so how on earth do they create this jargon highlighter.
>
> I can understand what's needed from a DB perspective, eg field for thethis> and field for the definition, but how on earth do I find and highlight[url]http://groups.google.com/groups?threadm=OaUoups%24CHA.2148%40TK2MSFTNGP10.p hx.gbl[/url]> word in a page of normal text?
>
> Any ideas on how to do this?
>
> Rgds
>
> Laphan
Chris Hohmann Guest



Reply With Quote

