Solved

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

Posted on 2006-06-14
4
201 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
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
LMuadDIb earned 250 total points
Comment Utility
0
 
LVL 30

Author Comment

by:Wayne Barron
Comment Utility
:)
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
Comment Utility
its not like I havent done that myself =)

stuff happens...
0
 
LVL 30

Author Comment

by:Wayne Barron
Comment Utility
Havn't we all.

Thanks a bunch
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now