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 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2005
    Location
    Halifax, Nova Scotia, Canada
    Posts
    392
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation I.E. Messing my simple script's day up!

    I am trying to use java to parse an e-mail address thus preventing bots from indexing it. I think this can be done with php as well. Am I going to have to do it with php to ensure that fools with default IE7 security settings won't get broken/missing links?

    I am also using java to open new windows and IE is breaking that nicely too. Suggestions?
    Once I thought I was wrong but I was mistaken.

  • #2
    Regular Coder Aradon's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    734
    Thanks
    0
    Thanked 20 Times in 19 Posts
    are you using a java applet or jsp?

    Also when you say that you are having java parse an email address what do you mean exactly? Someone is entering an email address and you're getting it?
    "To iterate is human, to recurse divine." -L. Peter Deutsch

  • #3
    Regular Coder
    Join Date
    Jul 2005
    Location
    Halifax, Nova Scotia, Canada
    Posts
    392
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Instead of displaying the e-mail link in its entirety it is breaking it into sections and then concatenating it and printing on the page. This is being done to avoid web spiders harvesting the e-mails and spamming them.
    Once I thought I was wrong but I was mistaken.

  • #4
    New Coder
    Join Date
    Apr 2007
    Posts
    34
    Thanks
    1
    Thanked 1 Time in 1 Post
    I am not very clear on your question....

    For the latter question of opening new windows, are you doing this through Java or Javascript? I don't even think you can do that with Java, so more than likely you are doing it with Javascript. Please be specific in what you mean by "IE is breaking that nicely too". What is the code that you are using and what is the effect (i.e. error) that you get as a result.

    In regards to the first question about breaking up the email address: you can do that via Javascript or Java. Assuming you are doing it in Java as you say, here is one possible way:

    Code:
    <&#37; 
      String email = "john.doe@foo.com";
      int divIndex = email.indexOf('@');
      String emailP1 = email.substring(0, divIndex);
      String emailP2 = email.substring(divIndex+1);
    
      out.write(emailP1 + " at " + emailP2);
    %>


  •  

    Posting Permissions

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