f



replace instances of text on page with image or other text?

Hello,

I need to look through the text on a page and replace certain words with an 
image or other word

something like:

read document
    find all instances of the word "blah"
    change all instances of the word "blah" to <img src="MyPicture.jpg" >


(jeez, I don't get why computers cant just read english!<G>)
and, no, I cant just change the page with 'find/replace' in notepad.

-- 
thanks,
juglesh    B>{)} 


0
juglesh
12/21/2004 6:54:42 PM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

16 Replies
936 Views

Similar Articles

[PageSpeed] 32

"juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
news:Sj_xd.302269$R05.120039@attbi_s53...
> Hello,
>
> I need to look through the text on a page and replace certain words with
an
> image or other word
>
> something like:
>
> read document
>     find all instances of the word "blah"
>     change all instances of the word "blah" to <img src="MyPicture.jpg" >
>
>
> (jeez, I don't get why computers cant just read english!<G>)
> and, no, I cant just change the page with 'find/replace' in notepad.
>
> --
> thanks,
> juglesh    B>{)}
>
>

It is not clear -- who's page?

For any given URL do you want to change "certain words" and display it or
what?


0
McKirahan
12/21/2004 7:14:11 PM
"McKirahan" <News@McKirahan.com> wrote in message 
news:7C_xd.268087$HA.48168@attbi_s01...
> "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
> news:Sj_xd.302269$R05.120039@attbi_s53...
>> Hello,
>>
>> I need to look through the text on a page and replace certain words with
> an
>> image or other word
>>
>> something like:
>>
>> read document
>>     find all instances of the word "blah"
>>     change all instances of the word "blah" to <img src="MyPicture.jpg" >
>>
>>
>> (jeez, I don't get why computers cant just read english!<G>)
>> and, no, I cant just change the page with 'find/replace' in notepad.
>>
>> --
>> thanks,
>> juglesh    B>{)}
>>
>>
>
> It is not clear -- who's page?

well, my .php is being included in their page(which they made for me) .  my 
..php page contains the head and the body tag, so i can put in a javascript, 
and call it from body onload.  basically, when it gets to your browser, you 
see my head content, and most of the body is theirs.

>
> For any given URL do you want to change "certain words" and display it or
> what?

so, not any given url, just on the pages where my head content is used.

their page is:
    <?php include  'http://www.mydomain.com/head.php'; ?>
    <p> Welcome. Content is here. blah and blah</p>
        </body>

my head.php is
    <head>
        <my javascript>
    </head>
    <body>

i want my js to change all instances of 'blah' to <img src="MyPicture.jpg" >

which would change the output to:
Welcome. Content is here. <the image> and <the image>




0
juglesh
12/21/2004 7:38:57 PM
"juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
news:lZ_xd.689446$mD.299515@attbi_s02...
>
> "McKirahan" <News@McKirahan.com> wrote in message
> news:7C_xd.268087$HA.48168@attbi_s01...
> > "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
> > news:Sj_xd.302269$R05.120039@attbi_s53...
> >> Hello,
> >>
> >> I need to look through the text on a page and replace certain words
with
> > an
> >> image or other word
> >>
> >> something like:
> >>
> >> read document
> >>     find all instances of the word "blah"
> >>     change all instances of the word "blah" to <img src="MyPicture.jpg"
>
> >>
> >>
> >> (jeez, I don't get why computers cant just read english!<G>)
> >> and, no, I cant just change the page with 'find/replace' in notepad.
> >>
> >> --
> >> thanks,
> >> juglesh    B>{)}
> >>
> >>
> >
> > It is not clear -- who's page?
>
> well, my .php is being included in their page(which they made for me) .
my
> .php page contains the head and the body tag, so i can put in a
javascript,
> and call it from body onload.  basically, when it gets to your browser,
you
> see my head content, and most of the body is theirs.
>
> >
> > For any given URL do you want to change "certain words" and display it
or
> > what?
>
> so, not any given url, just on the pages where my head content is used.
>
> their page is:
>     <?php include  'http://www.mydomain.com/head.php'; ?>
>     <p> Welcome. Content is here. blah and blah</p>
>         </body>
>
> my head.php is
>     <head>
>         <my javascript>
>     </head>
>     <body>
>
> i want my js to change all instances of 'blah' to <img src="MyPicture.jpg"
>
>
> which would change the output to:
> Welcome. Content is here. <the image> and <the image>
>

Will this work? Watch for word-wrap.

 <head>
 <script type="text/javascript">
 function MyHead() {
     var find = "blah and blah";
     var repl = "<img src='MyPicture.jpg'>";
     var page = document.body.innerHTML;
     while (page.indexOf(find) >= 0) {
         var i = page.indexOf(find);
         var j = find.length;
         page = page.substr(0,i) + repl + page.substr(i+j);
         document.body.innerHTML = page;
     }
 }
 </script>
 </head>
 <body onload="MyHead()">


0
McKirahan
12/21/2004 9:04:54 PM
make that:

     var find = "blah";


0
McKirahan
12/21/2004 9:06:15 PM
"McKirahan" <News@McKirahan.com> wrote in message 
news:Wd0yd.540796$wV.495762@attbi_s54...
> "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
> news:lZ_xd.689446$mD.299515@attbi_s02...
>>
>> "McKirahan" <News@McKirahan.com> wrote in message
>> news:7C_xd.268087$HA.48168@attbi_s01...
>> > "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
>> > news:Sj_xd.302269$R05.120039@attbi_s53...
>> >> Hello,
>> >>
>> >> I need to look through the text on a page and replace certain words
> with
>> > an
>> >> image or other word
>> >>
>> >> something like:
>> >>
>> >> read document
>> >>     find all instances of the word "blah"
>> >>     change all instances of the word "blah" to <img 
>> >> src="MyPicture.jpg"
>>
>> >>
>> >>
>> >> (jeez, I don't get why computers cant just read english!<G>)
>> >> and, no, I cant just change the page with 'find/replace' in notepad.
>> >>
>> >> --
>> >> thanks,
>> >> juglesh    B>{)}
>> >>
>> >>
>> >
>> > It is not clear -- who's page?
>>
>> well, my .php is being included in their page(which they made for me) .
> my
>> .php page contains the head and the body tag, so i can put in a
> javascript,
>> and call it from body onload.  basically, when it gets to your browser,
> you
>> see my head content, and most of the body is theirs.
>>
>> >
>> > For any given URL do you want to change "certain words" and display it
> or
>> > what?
>>
>> so, not any given url, just on the pages where my head content is used.
>>
>> their page is:
>>     <?php include  'http://www.mydomain.com/head.php'; ?>
>>     <p> Welcome. Content is here. blah and blah</p>
>>         </body>
>>
>> my head.php is
>>     <head>
>>         <my javascript>
>>     </head>
>>     <body>
>>
>> i want my js to change all instances of 'blah' to <img 
>> src="MyPicture.jpg"
>>
>>
>> which would change the output to:
>> Welcome. Content is here. <the image> and <the image>
>>
>
> Will this work? Watch for word-wrap.
>
> <head>
> <script type="text/javascript">
> function MyHead() {
>     var find = "blah and blah";
>     var repl = "<img src='MyPicture.jpg'>";
>     var page = document.body.innerHTML;
>     while (page.indexOf(find) >= 0) {
>         var i = page.indexOf(find);
>         var j = find.length;
>         page = page.substr(0,i) + repl + page.substr(i+j);
>         document.body.innerHTML = page;
>     }
> }
> </script>
> </head>
> <body onload="MyHead()">

almost works!  if i change repl to a different word, it will work (it will 
display another word), but if i use that img tag, nothing changes.




0
juglesh
12/21/2004 10:15:08 PM
"juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
news:Lf1yd.612732$D%.496186@attbi_s51...
>
> "McKirahan" <News@McKirahan.com> wrote in message
> news:Wd0yd.540796$wV.495762@attbi_s54...
>> "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
>> news:lZ_xd.689446$mD.299515@attbi_s02...
>>>
>>> "McKirahan" <News@McKirahan.com> wrote in message
>>> news:7C_xd.268087$HA.48168@attbi_s01...
>>> > "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
>>> > news:Sj_xd.302269$R05.120039@attbi_s53...
>>> >> Hello,
>>> >>
>>> >> I need to look through the text on a page and replace certain words
>> with
>>> > an
>>> >> image or other word
>>> >>
>>> >> something like:
>>> >>
>>> >> read document
>>> >>     find all instances of the word "blah"
>>> >>     change all instances of the word "blah" to <img
>>> >> src="MyPicture.jpg"
>>>
>>> >>
>>> >>
>>> >> (jeez, I don't get why computers cant just read english!<G>)
>>> >> and, no, I cant just change the page with 'find/replace' in notepad.
>>> >>
>>> >> --
>>> >> thanks,
>>> >> juglesh    B>{)}
>>> >>
>>> >>
>>> >
>>> > It is not clear -- who's page?
>>>
>>> well, my .php is being included in their page(which they made for me) .
>> my
>>> .php page contains the head and the body tag, so i can put in a
>> javascript,
>>> and call it from body onload.  basically, when it gets to your browser,
>> you
>>> see my head content, and most of the body is theirs.
>>>
>>> >
>>> > For any given URL do you want to change "certain words" and display it
>> or
>>> > what?
>>>
>>> so, not any given url, just on the pages where my head content is used.
>>>
>>> their page is:
>>>     <?php include  'http://www.mydomain.com/head.php'; ?>
>>>     <p> Welcome. Content is here. blah and blah</p>
>>>         </body>
>>>
>>> my head.php is
>>>     <head>
>>>         <my javascript>
>>>     </head>
>>>     <body>
>>>
>>> i want my js to change all instances of 'blah' to <img
>>> src="MyPicture.jpg"
>>>
>>>
>>> which would change the output to:
>>> Welcome. Content is here. <the image> and <the image>
>>>
>>
>> Will this work? Watch for word-wrap.
>>
>> <head>
>> <script type="text/javascript">
>> function MyHead() {
>>     var find = "blah and blah";
>>     var repl = "<img src='MyPicture.jpg'>";
>>     var page = document.body.innerHTML;
>>     while (page.indexOf(find) >= 0) {
>>         var i = page.indexOf(find);
>>         var j = find.length;
>>         page = page.substr(0,i) + repl + page.substr(i+j);
>>         document.body.innerHTML = page;
>>     }
>> }
>> </script>
>> </head>
>> <body onload="MyHead()">
>
> almost works!  if i change repl to a different word, it will work (it will
> display another word), but if i use that img tag, nothing changes.

ahh, think i got it! i had to change my quotes in the img tag to single
quotes.

is find a special variable?  if i wanted to find and replace some other 
words, how could i do that without making a bunch more functions?

thank you very much.



0
juglesh
12/21/2004 10:52:56 PM
juglesh wrote:
> Hello,
>
> I need to look through the text on a page and replace certain words
with an
> image or other word
>
> something like:
>
> read document
>     find all instances of the word "blah"
>     change all instances of the word "blah" to <img
src="MyPicture.jpg" >
>
>
> (jeez, I don't get why computers cant just read english!<G>)
> and, no, I cant just change the page with 'find/replace' in notepad.
>
> --
> thanks,
> juglesh    B>{)}
Maybe...

http://www.alistapart.com/articles/dynatext/

0
RobB
12/22/2004 1:38:24 AM
"juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
news:cP1yd.303759$R05.64258@attbi_s53...

[snip]

>
> ahh, think i got it! i had to change my quotes in the img tag to single
> quotes.
>
> is find a special variable?  if i wanted to find and replace some other
> words, how could i do that without making a bunch more functions?
>
> thank you very much.


"var find" and "var repl" are just variable names.


0
McKirahan
12/22/2004 1:52:55 AM
"juglesh" <juglesh@nospamRadioKDUG.com> wrote:

> read document
>     find all instances of the word "blah"
>     change all instances of the word "blah" to <img src="MyPicture.jpg" >
>
> (jeez, I don't get why computers cant just read english!<G>)

Well, it nearly looks like Applescript, which has a syntax like

  tell application "Finder" to set x to entire contents of folder
  "Macintosh HD:System Folder"

:-)
0
Martin
12/22/2004 2:22:02 AM
"McKirahan" <News@McKirahan.com> wrote in message
news:Xr4yd.304544$R05.275437@attbi_s53...
> "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
> news:cP1yd.303759$R05.64258@attbi_s53...
>
> [snip]
>
>>
>> ahh, think I got it! I had to change my quotes in the img tag to single
>> quotes.
>>
>> is find a special variable?  if I wanted to find and replace some other
>> words, how could I do that without making a bunch more functions?
>>
>> thank you very much.
>
>
> "var find" and "var repl" are just variable names.

yeah, ok, dreamweaver colors 'find' a different color, so I was thinking
that some special variable name or something.

well, I got it to work replacing 2 different words with two different
images, but only by duplicating the function (and adding a 2 to all the
variables).  but I cant seem to do multiple replaces within the same
function.  It seems like if I want to do 4 or 5 of these, its gonna get a
bit too much code if it could be done in one function.

thanks,



0
juglesh
12/23/2004 6:27:49 PM
"juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
news:F6Eyd.5255$k25.1585@attbi_s53...

[snip]

> > "var find" and "var repl" are just variable names.
>
> yeah, ok, dreamweaver colors 'find' a different color, so I was thinking
> that some special variable name or something.
>
> well, I got it to work replacing 2 different words with two different
> images, but only by duplicating the function (and adding a 2 to all the
> variables).  but I cant seem to do multiple replaces within the same
> function.  It seems like if I want to do 4 or 5 of these, its gonna get a
> bit too much code if it could be done in one function.
>
> thanks,

"find" is probably a reserved word in some language.

The version below handles multiple find/repl:

<head>
 <script type="text/javascript">
 function MyHead() {
     var list = new Array();
         list[0] = "blah1^<img src='MyPicture1.jpg'>";
         list[1] = "blah2^<img src='MyPicture2.jpg'>";
         list[2] = "blah3^<img src='MyPicture3.jpg'>";
     var j, k, find, item, page, repl;
     for (var i=0; i<list.length; i++) {
         item = list[i].split("^");
         find = item[0];
         repl = item[1];
         page = document.body.innerHTML;
         while (page.indexOf(find) >= 0) {
             var j = page.indexOf(find);
             var k = find.length;
             page = page.substr(0,j) + repl + page.substr(j+k);
             document.body.innerHTML = page;
         }
     }
 }
 </script>
 </head>
 <body onload="MyHead()">


0
McKirahan
12/23/2004 9:46:51 PM
"McKirahan" <News@McKirahan.com> wrote
>
> The version below handles multiple find/repl:
>
> <head>
> <script type="text/javascript">
> function MyHead() {
>     var list = new Array();
>         list[0] = "blah1^<img src='MyPicture1.jpg'>";
>         list[1] = "blah2^<img src='MyPicture2.jpg'>";
>         list[2] = "blah3^<img src='MyPicture3.jpg'>";
>     var j, k, find, item, page, repl;
>     for (var i=0; i<list.length; i++) {
>         item = list[i].split("^");
>         find = item[0];
>         repl = item[1];
>         page = document.body.innerHTML;
>         while (page.indexOf(find) >= 0) {
>             var j = page.indexOf(find);
>             var k = find.length;
>             page = page.substr(0,j) + repl + page.substr(j+k);
>             document.body.innerHTML = page;
>         }
>     }
> }
> </script>
> </head>
> <body onload="MyHead()">

thank you very much, this is perfect!!!  One hint, don't try naming your 
images the same as the word you are trying to replace<G> (blah1.gif-doesn't 
work).  throws IE into a tailspin.

seems to run fast enough on my puter(xp, 2.8ghz, 512ram), do you think it 
would be a problem on a lesser machine?  at what point, x number of replaced 
words, or x number of instances of the words in the page, would it be a 
problem?  I ask cuz it seems to me that we are storing the 
document.body.innerHTML  a lot.  seems a lot of stuff to have in memory and 
be looking thru multiple times, but I don't really know.

-- 

juglesh 


0
juglesh
12/25/2004 5:53:56 AM
"juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
news:Tf7zd.630520$D%.101935@attbi_s51...

[snip]

> thank you very much, this is perfect!!!  One hint, don't try naming your
> images the same as the word you are trying to replace<G>
(blah1.gif-doesn't
> work).  throws IE into a tailspin.
>
> seems to run fast enough on my puter(xp, 2.8ghz, 512ram), do you think it
> would be a problem on a lesser machine?  at what point, x number of
replaced
> words, or x number of instances of the words in the page, would it be a
> problem?  I ask cuz it seems to me that we are storing the
> document.body.innerHTML  a lot.  seems a lot of stuff to have in memory
and
> be looking thru multiple times, but I don't really know.
>
> --
>
> juglesh
>
 Then let's only use it once:

<head>
 <script type="text/javascript">
 function MyHead() {
     var list = new Array();
         list[0] = "blah1^<img src='MyPicture1.jpg'>";
         list[1] = "blah2^<img src='MyPicture2.jpg'>";
         list[2] = "blah3^<img src='MyPicture3.jpg'>";
     var j, k, find, item, repl;
     var page = document.body.innerHTML;
     for (var i=0; i<list.length; i++) {
         item = list[i].split("^");
         find = item[0];
         repl = item[1];
         page = document.body.innerHTML;
         while (page.indexOf(find) >= 0) {
             var j = page.indexOf(find);
             var k = find.length;
             page = page.substr(0,j) + repl + page.substr(j+k);
         }
     }
     document.body.innerHTML = page;
 }
 </script>
 </head>
 <body onload="MyHead()">

Also, I'd suggest that instead of using "blah" use a tag-like reference such
as [blah] si it will stand out more and can't be confused with an image
name.


0
McKirahan
12/26/2004 5:21:01 PM
"McKirahan" <News@McKirahan.com> wrote in message 
news:0qCzd.19336$k25.3159@attbi_s53...
> "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
> news:Tf7zd.630520$D%.101935@attbi_s51...
>
> [snip]
>
>> thank you very much, this is perfect!!!  One hint, don't try naming your
>> images the same as the word you are trying to replace<G>
> (blah1.gif-doesn't
>> work).  throws IE into a tailspin.
>>
>> seems to run fast enough on my puter(xp, 2.8ghz, 512ram), do you think it
>> would be a problem on a lesser machine?  at what point, x number of
> replaced
>> words, or x number of instances of the words in the page, would it be a
>> problem?  I ask cuz it seems to me that we are storing the
>> document.body.innerHTML  a lot.  seems a lot of stuff to have in memory
> and
>> be looking thru multiple times, but I don't really know.
>>
>> --
>>
>> juglesh
>>
> Then let's only use it once:
>
> <head>
> <script type="text/javascript">
> function MyHead() {
>     var list = new Array();
>         list[0] = "blah1^<img src='MyPicture1.jpg'>";
>         list[1] = "blah2^<img src='MyPicture2.jpg'>";
>         list[2] = "blah3^<img src='MyPicture3.jpg'>";
>     var j, k, find, item, repl;
>     var page = document.body.innerHTML;
>     for (var i=0; i<list.length; i++) {
>         item = list[i].split("^");
>         find = item[0];
>         repl = item[1];
>         page = document.body.innerHTML;
>         while (page.indexOf(find) >= 0) {
>             var j = page.indexOf(find);
>             var k = find.length;
>             page = page.substr(0,j) + repl + page.substr(j+k);
>         }
>     }
>     document.body.innerHTML = page;
> }
> </script>
> </head>
> <body onload="MyHead()">
>
> Also, I'd suggest that instead of using "blah" use a tag-like reference 
> such
> as [blah] si it will stand out more and can't be confused with an image
> name.

this last one isnt working here.  only the third item is replaced.

I sorta see where you're going, though.  you only do the 
document.body.innerHTML = page at the end, and not through every for/while 
loop?  as you may have guessed, I'm just a copy/paste javascripter,  I get 
most of it, and if I squint at the code for long enough while flipping 
through javascript references online, I can grok a bit more.

afa [blah] , do you mean that I should have the text to be replaced in the 
html changed to bracketed?  because that's why I'm going through all this in 
the first place, I cant change most of the body of the page (well, not 
without js).

-- 
juglesh 


0
juglesh
12/26/2004 10:16:35 PM
"juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
news:6LGzd.261461$V41.16042@attbi_s52...

[snip]

Remove the instance of
    page = document.body.innerHTML;
just before the "while" statement.

I just meant that if you had control obver the page it would be nice to more
clearly identify replacable elements.


> this last one isnt working here.  only the third item is replaced.
>
> I sorta see where you're going, though.  you only do the
> document.body.innerHTML = page at the end, and not through every for/while
> loop?  as you may have guessed, I'm just a copy/paste javascripter,  I get
> most of it, and if I squint at the code for long enough while flipping
> through javascript references online, I can grok a bit more.
>
> afa [blah] , do you mean that I should have the text to be replaced in the
> html changed to bracketed?  because that's why I'm going through all this
in
> the first place, I cant change most of the body of the page (well, not
> without js).
>
> --
> juglesh
>
>


0
McKirahan
12/27/2004 2:53:10 AM
"McKirahan" <News@McKirahan.com> wrote in message 
news:qOKzd.812226$8_6.276494@attbi_s04...
> "juglesh" <juglesh@nospamRadioKDUG.com> wrote in message
> news:6LGzd.261461$V41.16042@attbi_s52...
>
> [snip]
>
> Remove the instance of
>    page = document.body.innerHTML;
> just before the "while" statement.

cool.

> I just meant that if you had control obver the page it would be nice to 
> more
> clearly identify replacable elements.

true, dat.  I'm trying to get them to call my  replaceElements.php  so i can 
just put some urls to my images where i need them. 


0
juglesh
12/27/2004 4:14:00 AM
Reply:

Similar Artilces:

Replace text with image in text widget
I'm trying to replace an emoticon with an actual image in a text widget. I know I'm not doing this correctly: the sample code below inserts two images randomly and seems to garble the text in other ways. The idea is to have two emoticons (one on each line) and replace them with an image, nothing more. Can anyone take a look and suggest how I might get this to work? Thanks. --- SPfHZvvOGvfQEvfGdvjQE/rNMfrOMfrNPfvQHfzQHfjQLfrNRvjQL/vRJfzRJvrOWvbMh/3VHPfM h/3WHPzVMP7XF/zVMfrPdv7YGP7YG/7YHPzWPPzWPfvUVP7ZHf7ZIPvWVf7aJv7aJ/7bJv7bM/7b NP7cLf7dMPvXeP7dNvrVlv7eOPrWlvvaevrYmP7gRP7gRf7gRv7i...

Pages
I have a titel-textfield over a pic (headline) , text is black, background for text transparent. A second textfield should overlapp the first textline..... When i arrange the second field with the same settings like the first, the first text disappear... How can i do, that the second text overpapps the first, all over the pic. Any help appreciated! Thanks for replies! I am german and hope that the engish speaking people understand my problem! Soory! Gerd In article <611db9e2-b085-4fe5-907a-ca714b0c32dd@m74g2000hsh.googlegroups.com>, hurlebaus <gerd.schenk@freenet.de> wrote:...

Printing text, image, text, image, ...
I have bunch of text files (about 20 lines) and bunch of image files. Is there a clean way to print text, then image, then text, then image, ...., as though there are in single continuous document? -- William Park <opengeometry@yahoo.ca>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell http://freshmeat.net/projects/bashdiff/ ["Followup-To:" header set to comp.os.linux.misc.] On Fri, 23 Jun 2006 20:01:01 -0400, William Park staggered into the Black Sun and said: > I have [a] bu...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What a...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

how to replace text on a page using Javascript code
Hi, I recently posted "problem with Javascript code from Include" Thanks to response I have now fixed the problem. This is to ask how to solve my next problem/step. I am using javascript to create my email address on the fly so as to avoid SPAM harvesters. I like to see where I have placed the email address during design time. What I am doing now is setting the marker text as hidden so it appears at design time but is invisible at run time. I use this code to display the spot followed by the call to create the address. Send Email to: <span style="visibility: hidden"...

Text IN an Image To Straight Text?
Hi. (I'm not sure where to ask this so I'm trying a few newsgroups) I have some .jpg's of text documents. Is there a utility which will work like OCR in a scanner, helping to convert the text WITHIN the image to straight text? I don't have a printer working at the moment, or I'd print the .jpg's and then scan them using OCR. (The format doesn't necessarily have to be .jpg) Thanks in advance for any help GP Yes, if the image is not to bad a pic (not much noise and all that). Try http://www.twocows.com/windows.html I know they have a couple of ocr programs s...

Text in images to a text file
Hello, Does anyone know of any software for Linux which converts text in images to a text file. I have loads of paper documents that I intend to scan. The contents of these documents needs to eventually end up on a web site but as text. Darren <bobblebob@gmail.com> wrote in message news:1151612491.407262.124690@75g2000cwc.googlegroups.com > Does anyone know of any software for Linux which converts text in > images to a text file. I have loads of paper documents that I intend > to scan. The contents of these documents needs to eventually end up > on a web site but as text....

aligning text and image-text
I use a program to make Email addresses harder for spammers to harvest. It converts them to slightly blurred images using http://mindprod.com/products1.html#MASKER When I embed them in text, I have figured out how to get them to align naturally with the surrounding text, but the browser inserts extra inter-line spacing above the line containing the image. You can see the effect at http://mindprod.com/book/books.html at the bottom of the page where it says: "Please email your feedback for publication, letters to the editor, errors, omissions, typos, formatting errors, ambig...

Replacing text in a text file with VB6
Hi all, I'm trying to figure out how to replace text in a text file with a new string. The replace function seems to be the way to go, but I can't get it to work right. The program is a time clock for employees to punch in and out at a business. It uses ADOX for its database and creates a separate text file for each employee which the clock in and clock out timestamps are written to. The top 3 lines of each file containe 1. The employee's name, 2. His or her SSN, and 3. His or her employee number. If an employee's name or SSN changes, I have no problem updatin...

convert text images in pdf to text
Hi, I have a pdf file where someone scanned in pages from a book and stored them as images in a pdf file which is 16 meg. Is there an easy way I can do some kind of OCR on this file to just get plain text from the images of text in the pdf? Using a standard pdf to txt converter won't work because the file contains images of text as it appears in the book. Thanks, Ben -- Cheap long distance calling using Onesuite (http://www.onesuite.com). 2.5 cents/min anywhere in the U.S., to Canada or the U.K. No monthly or connection fees! Use promotional code 038664643 for 20 free minutes. Tr...

Text overlapping other text when I resize my page
Hi, here is my code in which I am aligning a text to bottom of my page using CSS <html> <head> <style type="text/css"> ..Footer { position:absolute; bottom:0; } </style> </head> <body> <h2 >This is a heading with an absolute position</h2> <p>With absolute positioning, an element can be placed anywhere on a page. The heading below is placed 100px from the left of the page and 150px from the top of the page.</p> <div class ="footer">this is the text at bottom</div> ...

replacing text for use in a text area...
Hi Gurus I have a PHP page that allows a user to preview an email and then send it if(s)he is happy with it. Otherwise, they can click on an edit button and edit the text of the message. The text is then shown in a textarea element. While in situation A (the preview), a bit of formatting is useful (e.g <BR>), all of this formatting is a nuisance in the textarea. Basically, I would like to do the following: a. replace <BR> with a line break for the textarea b. get rid of double spaces and tabs before the text is loaded in the textarea c. put the <BR>s back in when the use...

PDF image of text to readable text ?
Seems there are web based tools and software. My son needs text to have it read for him. He has a PC. Found PDF reader $50 , http://thurly.net/11ia and http://thurly.net/11i4 the last being google. Wondering what you folks found useful or use ? Thanks! -- Bill S. Jersey USA zone 5 shade garden http://uppitywis.org/ live WI ...

replacing text in a page
Hi. I'm trying to replace some text in a page via the location bar (in IE or Firefox). When I type in: javascript:document.body.innerHTML=document.body.innerHTML.replace("oldtext","newtext"); The text is changed, but all formatting is lost also! Is there a way around this? Cheers, prw404 prw said: > >Hi. I'm trying to replace some text in a page via the location bar (in >IE or Firefox). When I type in: > >javascript:document.body.innerHTML=document.body.innerHTML.replace("oldtext","newtext"); > >The text is changed, but...

Text and Image inside table <td> Alight Text Left and Image right in same cell ??
Is that possible? How? <td > <asp:Label ID="StartDateLabel" runat="server" Text="Start Date:"> <asp:imagebutton ID="Imagebutton1" width=18 Height=18 CommandName=SetDate imageUrl="../cal.jpg" runat=server /> </asp:Label> </td> <td > On 2006-10-24, Jason <jason@cyberpine.com> wrote: > Is that possible? How? Set text-align: left on the cell as usual (it's likely to be the default), and make the image float: right. To work around a Firefox float bug, better to put the image befor...

Can JavaScript select text in a text-field?
Hi, I would like to have a text-field (in html form) with a selected text. In other words, it user loads the form, he/she can see a text in the text field (this text should explain what should be put in the text field). It is convenient to have a selected text, so that it user start to write something in the text filed the selected text will be immediately deleted. Thank you in advance for any help. On 2009-01-20 02:07, Kurda Yon wrote: > I would like to have a text-field (in html form) with a selected text. You can use fieldElement.focus() and fieldElement.select(). - Conrad ...

Scanned text (image) needs to be converted to text
Hello all, I have a PDF of a contract that was scanned in and stored as an image (so we can't select the text). Is there any way to convert an image to text (preferably built in to Adobe Acrobat or a free plug-in)? We are using Adobe Acrobat 5.0. Thanks for any help anyone can provide, Conan Kelly Conan Kelly wrote: > Hello all, > > I have a PDF of a contract that was scanned in and stored as an image > (so we can't select the text). > > Is there any way to convert an image to text (preferably built in to > Adobe Acrobat or a free plug-in)? > &...

Surrounding text with text
I was wondering if it was possible to surround a text body with text like so: +--------------+ |ABCDEFGHIJKLM | |H N| |A Main Body O| |L Text goes P| |B here Q| |-=+_ZYXWVUTSR | | | | | | | | | +--------------+ This seems far-fetched, but just curious. I suppose that I could just move stuff around by hand in the GIMP later on, but there's probably a {better,more {extensible,clean}} way of doing it from (La)TeX. -FreeSmith ptjm@interlog.com (Patrick TJ McPhee) wrote in message news:<bffbhe$per$1@news.eusc.inter...

ghostscript PDF page extraction, leaving text as text
Ghostscript may be used to extract pages from a PDF file with a command like this: gs -sDEVICE=pdfwrite \ -dNOPAUSE -dBATCH -dSAFER \ -dFirstPage=48 -dLastPage=48 \ -sOutputFile=onepage.pdf input.pdf The problem is, while that page looks the same as the original in a PDF reader, it seems to be an image rather than an "object" representation. That is, open the extracted PDF in something like Acrobat or PDF XChange Viewer and "search" and "text selection" work, whereas in the extracted one neither function works. Presumably this is because the text has been r...

Finding and replacing text on a page
Say I have a page, which has been created by a third party, and the page may contain some pre-specified text. How can I find and replace that text dynamically? For example, if the page I have contains this HTML: <div id=�oDiv� style="margin-bottom:10px;">{when}</div> <div> <table style="border:1px solid gray"> <tr> <td>blah</td> <td><img src="img.gif" title="image"></td> </tr> <tr> <td style="background-color:#F3F3F3;">Visit us <st...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over there you can meet other users of Bentley products, exchange ideas, and discuss a wide range of technical subjects. These groups are an excellent technical resource for all users of Bentley products and services. Hope to see you there! For more information take a peek at this page: http://selectservices.bentley.com/discussion/index.htm -- Best Regards, Inga Morozoff [Bentley] www.askinga.com "jgonzales24" <jgonzales24@cox.net> wrote in message news:xcLMb.13975$zs4.2376@fed1read01... > I'm rather new to ustation and am having trouble finding replacements for > all of my Acad lisp routines. One that I'd like to find changes a selected > text string to read like the second selected text string. I realize this > can all be done in the text editor but it's not all that quick. Does anyone > know of a macro or mdl whi...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

Why does $TEXT() not return text?
I am looking at a file I have created named TMGUSRI2.m This is with GT.M 6.2-002A Here is a stat of the .m file and the .o file kdt0p@poweredge:/opt/worldvista/EHR/p$ stat TMGUSRI2.m File: `TMGUSRI2.m' Size: 19171 Blocks: 40 IO Block: 4096 regular file Device: 821h/2081d Inode: 705008 Links: 1 Access: (0744/-rwxr--r--) Uid: ( 1000/ kdt0p) Gid: ( 1000/ kdt0p) Access: 2015-08-10 20:50:51.000000000 -0400 Modify: 2015-06-23 20:23:12.000000000 -0400 Change: 2015-06-23 20:23:11.000000000 -0400 Birth: - kdt0p@poweredge:/opt/worldvista/EH...

Web resources about - replace instances of text on page with image or other text? - comp.lang.javascript

Instance (computer science) - Wikipedia, the free encyclopedia
An instance, in object-oriented programming (OOP) , is a specific realization of any object . An object may be varied in a number of ways. Each ...

Mark Zuckerberg On Oculus VR, WhatsApp Acquisitions: ‘These Are Two Kinds Of Rare Instances’
Facebook Co-Founder and CEO Mark Zuckerberg said during his keynote address at the 2014 GSMA Mobile World Congress in Barcelona, Spain, Feb. ...

Changed the AWS instance size on the Trex server from small to large, and now it runs much better. ;-) ...
... piece. The one that made the big difference came from my longtime programming friend Chuck Shotton. We increased the size of the AWS instance ...

The Instance - Podcast App on the App Store on iTunes
Get The Instance - Podcast App on the App Store. See screenshots and ratings, and read customer reviews.

An instance of the fingerpost - Flickr - Photo Sharing!
Quite literally a fingerpost. Pelsall, Walsall, West Midlands. I had to drive past it to get to a meeting today. Great isn't it?

Buzzfeed Cans Editor After Uncovering '40 Instances' Of Plagiarism
... Editor-In-Chief Ben Smith announced his decision to fire the site’s “viral politics” writer Benny Johnson after finding at least “40 instances” ...

ACORN website allows Canberrans to report growing instances of cybercrime
A new website to fight cybercrime is set to save police an enormous amount of time and money.

Abbott's shift on settlements one more instance of secrecy
At least the Abbott government is doing its bit for the reading skills of journalists within Australia. Since there are fewer news conferences, ...

Little Lunch and Utopia are instances of great TV screenwriting
In terms of quality being measured against quantity, the best new Australian television show this year is Little Lunch.

Queensland Police are investigating several instances of looting in Bundaberg and Gympie
POLICE are investigating several instances of looting in Gympie and Bundaberg in the wake of flooding.

Resources last updated: 3/1/2016 4:23:05 AM