Solved

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

Posted on 2006-06-14
4
205 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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

752 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