Link to home
Start Free TrialLog in
Avatar of Wayne Barron
Wayne BarronFlag for United States of America

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of LMuadDIb
LMuadDIb
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Wayne Barron

ASKER

:)
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
its not like I havent done that myself =)

stuff happens...
Havn't we all.

Thanks a bunch