Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need to edit a list.

    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?

    Thanks!

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Montreal, Canada
    Posts
    644
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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();
    pop.document.write(same)

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

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would ask how is this list stored?
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    New to the CF scene
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.?
    Last edited by burnt; 06-18-2002 at 05:32 PM.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •