Solved

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

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

685 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