View Full Version : I need to edit a list.

Jun 18th, 2002, 01:52 AM
I have a long list of email names that I need to check for duplicate names.

Is this something I can do with JavaScript?

If so please advise.

If not what will accomplish this task?


Jun 18th, 2002, 02:23 AM
How is the list set up? Is it an array? Is it just a file with a list of emails? The easiest way that I know of would be to set up arrays and use the following:

arr = new Array();
same = "";

for (x=0; x<arr; x++) {
for (y=0; y<arr; y++) {
if (arr[x]==arr[y]) { same += x+" , "+y+"are the same<br>" };
pop = window.open();

if it's just a file, you can use asp to read the file and paste into an array.

Jun 18th, 2002, 02:35 AM
I would ask how is this list stored?

Jun 18th, 2002, 05:10 PM
It is a log.txt file with an email address on each line.

I have a little knowlegde of JavaScript and Perl, mostly just enough to read and hack it.

I have never used asp but I design in GoLive and my server supports it so I could learn.

I hacked a FormMail script by Matt Wright to log the addresses from the update bar on the first page and the users who send e-greetings from my site.

I could possibly change log.txt to something else.?

Jun 19th, 2002, 03:56 AM
Not sure how you'd do it in GoLive or Perl... but in ASP or PHP or any other server-side language you'd just loop through the list of email addresses to see if you find a match.