Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Can this be done in HTML?

    I would like to do the following, and am not sure if it's possible in HTML <UL><LI>have a page which contains all the email addresses we wish to provide on our website (suitably cloaked, of course!)<LI>have some form of link in the appropriate HTML pages which will invoke the required person's 'mailto' address but not change the focus from the current page to the 'email addresses' page[/list]Does this make any sense? The aim is obviously to remove instances of 'real' email addresses spread all over web pages, and localise them in one place.

    Thanks

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    John this is an idea I have had using a drop down which may give you a starter for 10 and some ideas. I have put in a text file as it contains script
    Jerry

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Hi John

    This is to be my Christmas break project <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I am creating a little function that will cloak your email and we can store the names in a js file for the time being here it is with one address, I shall carry on building it so that you can have multiples:

    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>A Cloaked Email Address Function</title>
    <script>
    function setAddr(name) {
    var obj = document.getElementById('contactAddr');
    if (obj) {
    switch(name) {
    case 'j': name += 'ezza'; break;


    }
    var dmn = new Array('uk','.','for','magic','','').reverse().toSt ring();
    dmn = dmn.replace(/,/g,'').replace(/(for)/g,'$1est');
    obj.href = 'mailto:' + name + '@' + dmn;
    }
    return true;
    }
    </script>
    </head>
    <body>




    Jezza Bear
    </p>
    </body>
    </html>
    the

    var dmn = new Array('uk','.','for','magic','','').reverse().toSt ring();
    dmn = dmn.replace(/,/g,'').replace(/(for)/g,'$1est');
    obj.href = 'mailto:' + name + '@' + dmn;

    part of the code mixes the email address up into little chunks and the reverses it an concatenates it...another starter for 10 <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  4. #4
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Hey, Jerry, don't go too far, since I would like to use EnkoderForm to 'generate' the javascript code for the mailto, etc, stuff, to make the website entirely @-free!

    What I would like to do in the appropriate HTML page is the equivalent of
    CALL MAILTO("Joe Bloggs")
    instead of something like
    Joe Bloggs

    where "MAILTO" represents some form of web page (or JS file?) containing individual instances of
    < !--- Joe Bloggs --->
    then the EnkoderForm Javascript for mailto: Joe Bloggs encrypted
    then RETURN;

    < !--- Fred Bloggs -->
    then the EnkoderForm Javascript for mailto: Fred Bloggs encrypted
    then RETURN;

    and so on (but in working HTML or Javascript)!

    John

    PS Please note that both HTML and Javascript are areas of ignorance, as you will have detected!

    PPS I see on our 'other' website we have code looking somewhat like
    < !-- SpamProof Mail Script 1.0 - freeware
    var linktext = "Email the WebMistress"
    var email1 = "Josephine Bloggs"
    var email2 = "ourdomain.com"
    document.write("" + linktext + "")
    -->

    Sophisticated, huh?!
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Not to worry John, I am doing it for myself as well <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    I took my Guestbook off-line recently and I am being spammed something chronic, so I am changing my email address and going to experiment with this code and see what happens. The addition of new users is actually very simple so I shall report back anyway to share with all.
    Jerry

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Can this be done in HTML?

    You can paste the Enkoder code into an external .js file, but you need to give each function a unique name (any name you like, really), remove the call to run it immediately, and then use the matching name in your HTML documents.
    Attached Files Attached Files

  7. #7
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    I may be very thick headed on this, John, but I don't see what's wrong with something like Jezza's drop down button post. All YOU'VE got to do is get the Enkoderform code for each email person and put it in his drop down button code wherever there is an email address. Obviously, you will need to add to his code for how ever many email persons you have in the organization.

  8. #8
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Hi Al

    I was reviewing <post:=622,099>post 622,099</post:> and whilst I agree with you John could use his enKoding option, I still think it would be a hefty undertaing for him to put this on an HTML file. I mentioned js files as they are a neat method of keeping the code away from the main htm file and is what Jeff has done in his concept.

    The js file is simply a file that contains javascript and can contain vast amounts of complex and re-usable code away from the html file, very much like a module in VB. the code is simply put in the HEAD tag as such:

    <script src="myjavascript.js" language="javascript" type="text/javascript"></script>

    where myjavascript.js contains the functions not bound by script tags

    I have been experimenting with my idea in <post:=622,112>post 622,112</post:> and put that script in a js file. So far I have had no spam through that dummy account and am going to build a few more as I have a spare 748 accounts at present.

    So I reckon John could mix and match my option and Jeff's quite happily <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  9. #9
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Please accept that I know that you and Jefferson are on to this thing very expertly and I should butt out. But I was going on the basis of what seemed to be John's reluctance to get "too complicated" in the project. The encoder site that he likes and I've tested on my web page, would work quite nicely in a drop down situation, but I'll say no more and let you folks continue on... John: Good luck with it!

  10. #10
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    I was not asking you to butt out, your idea is fine, I would improve your suggestion as I stated, by no means are Jeff and I the experts. I shall visit your site in a moment and see how it looks, I would like your feedback too with your idea as I am trying to see the best option too and John's question has sparked an interest <img src=/S/grin.gif border=0 alt=grin width=15 height=15> <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

  11. #11
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Being a bear of very little brain (unlike Jerry!), I'm simply hoping to get something which satisfies my particular enthusiasms.

    The primary aim is to make the "mailto" addresses utterly, completely, and totally, unharvestable. If they are in a file (html, javascript, whatever) in an inaccessible directory on the website, then I don't really mind what form they take. I like the Enkoder Form function because you just paste the code inline instead of the original "mailto" link, and it seems to me to be extremely difficult to 'break'. If no robot could ever get at the directory where the file is, then they could just be mailto's, with entry-points before, and returns after, each one!

    The secondary aim is to be able to 'call' the appropriate "mailto" 'subroutine' for a user name from anywhere in the html code of a website (and, I discovered yesterday, perhaps from a second website)...

    The third aim would be to make the whole mechanism easily maintainable, requiring minimal changes and file uploads.

    My preference is not to have a drop-down list, because I don't want the user to be able to choose (perhaps incorrectly!) from a list of possibilities. A particular location in the web page ==> a particular email address.

    My main problem is that I've never worked in this area, and so quite often don't have a clue what people are talking about. I can do BATch files, and used to write Fortran, but I don't program for a living...

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  12. #12
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Can this be done in HTML?

    In order to get useful mailto links, the user's browser will need access to the "enkoded" addresses, whether in-page or external; whether bots can be singled out and denied access is a difficult problem. Checking the user agent string and HTTP_REFERER might work on some of them, but this is a lot of extra work and might deny access to users with privacy filters (e.g., Norton Internet Security) turned on. Hopefully the "enkoding" will provide "good enough" security. If not, you might have to use CAPTCHA.

  13. #13
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    <P ID="edit" class=small>(Edited by Jezza on 27-Dec-06 15:05. To alter syntax error-Cheers Jeff)</P>Hi John

    Your frustration is noted.

    Then for this exercise I think you should go for Jeff's suggestion. The reason I think this would be best is you can store and easily maintain the email address encoding better. Think of the javascript (js) file as an external file referenced to your main html file just like a css or cascading style sheet.

    If you have a new member of staff or email address to put on your site go to the enKoder generate the desired code and paste it in the js file and give the function name relating to the persons name ie

    function johng() {
    [put enKoder code here]
    }

    In you html page place the code like this somewhere:



    <script type="text/javascript">johng();</script></p>

    This will create the code in the form johngray@home.co.uk

    Personally I think Jeff's and your idea is best as it is easier to maintain multiple addresses on one page as mine is only really good for a single one (at the moment)
    Jerry

  14. #14
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Jerry and Jefferson:

    Thanks for the further posts. I confess I didn't notice Jefferson's ZIP file until five minutes ago, and you thus may have been puzzled by my latest post as a result!

    I will try to work both collections of information together, after I have asked;

    1) Can I call as a javascript function (?) something in quotes with a blank in it:
    E.g., instead of
    <script type="text/javascript">MisterSteve();</script>
    can I do
    <script type="text/javascript">"John Gray"();</script>

    And is the function name case-sensitive, or could I use "mistersteve" or "mISTERsTEVE"?

    2) does the .JS file have to be in the same directory as the .HTML files?
    Alternatively, how do I 'call' it if it is in a subdirectory?
    Do I change src="enkoded.js" to src="javadirenkoded.js" (for example)?

    3) is there a way to call the javascript file on one website from an HTML file which is in a different website, so I can just have a single JS file?

    Thanks!

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  15. #15
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can this be done in HTML?

    Hi John

    I thought you may have missed it and put it down to the season's festivities <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Answers in your order:

    1) No it has to be a single word and is Case SEnSitivE ie JohnGray ≠ Johngray ≠ johngray

    2) The js file can be anywhere you want it and can be an absolute address to a fixed url ie http://www.magicforest.co.uk/johng/javadir/jg.js or can be relative to the document in the root ie /javadir/jg.js

    Just note the forward slash / is required for the relative and absolute link
    Jerry

Page 1 of 2 12 LastLast

Posting Permissions

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