Solved

Loop through and Insert Numbers into URL of RichEdit component (Code Supplied)

Posted on 2006-06-14
4
206 Views
Last Modified: 2012-05-05
Hello All;

  I am using the following code to created a list of Links to our companies Website(s).
But instead of it working like it should, it is not working at all.

=================================================
procedure TProject1.OButton1Click(Sender: TObject);
var
CID, Con : String;
I : Integer;
begin
  RichEdit3.Clear;
  for I := 0 to RichEdit2.Lines.Count -1 do
  begin
  CID := StringReplace(RichEdit1.Lines[i], ' ', ' ',[rfReplaceAll]);
  Con := StringReplace(RichEdit2.Lines[i], ' ', ' ',[rfReplaceAll]);

 RichEdit3.Lines.Add('http://www.sitename.com/content_by_cat3.asp?contentid='+RichEdit1.Text+'&catid='+RichEdit2.Text+'');
 end;
end;
=================================================
The [RichEdit1] Contains the ContentID #'s
The [RichEdit2] Contains the CatID #'s

Like so:
RichEdit1 has the following Values for ContentID=
56
57
58
59

RichEdit2 has the following Values for CatID=
1
2
3
4

The output needs to look like this in the RichEdit3:

content_by_cat3.asp?contentid=56&catid=1
content_by_cat3.asp?contentid=57&catid=2
content_by_cat3.asp?contentid=58&catid=3
content_by_cat3.asp?contentid=59&catid=4


I hope I explained it well enough?
Thanks All, this is sort of agrivating me, as I can make it work any other way except this way.

Carrzkiss
0
Comment
Question by:Wayne Barron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
LMuadDIb earned 250 total points
ID: 16905179
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 16905295
:)
Dang, well, I think that I really goofed on that one :)
Excuse me while I go off and kick myself a few times.

That was a Quick 250=4=1,000 Points for you wasn't it?

Take Care and thank you for getting my head out of these Tropical Winds & Rains we are having today.

Carrzkiss
0
 
LVL 4

Expert Comment

by:LMuadDIb
ID: 16905376
its not like I havent done that myself =)

stuff happens...
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 16905411
Havn't we all.

Thanks a bunch
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month4 days, 16 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question