Sounds like an interesting approach!

Standard Disclaimer:
---------------------------
This really sounds like a place where you should use a contact form
and server side processing, yada, yada, yada.
---------------------------

Um...  let's see.  You really have lots of options as to how to obtain
the href of that link.  You could get a collection of all the links on
the page as such:

var arLinks  =  document.getElementsByTagName('a');

you can then loop through it and look for a signifier... let's say
you've decided any link with the class name "reconfigurator" should
behave in the manner you describe.

for(i=0;i<arLinks.length;i++){
        if(arLinks[i].className == 'reconfigurator'){
                arLinks[i].onmouseover == reconfigurate(this.href);
                arLinks[i].onfocus == reconfigurate(this.href);
                arLinks[i].onmouseout == deconfigurate(this.href);
                arLinks[i].onblur == deconfigurate(this.href);
        }
}

Alternatively, if there are just a few anchor elements you want to
grab, rather than enough to warrant looping through every one on the
page, you can get individual ones by assigning them and id:

<a href="whatever" id="uniqueID">whatever</a>

then grab it using getElementById:

var uniqueElement = document.getElementById('uniqueID');

then you can do things like:

uniqueElement.onmouseover = myFunc(uniqueElement.href);

HTH,
Stephen

(btw a good DOM scripting reference is at
http://www.mozilla.org/docs/dom/domref/)




On Fri, 25 Mar 2005 20:23:40 -0000, Bj <[EMAIL PROTECTED]> wrote:
> I am trying to do something sneaky to avoid address harvesting, and
> rewriting the href of a mailto: link on a mouseover or onFocus event (so it
> only contains the real email address if a human is about to click on it).
> 
> Can someone remind me (imminent brain failure): NS is happy with referencing
> an anchor by
> 
>   document.anchors[name].href=
> 
> IE doesn't seem to like this, although it was quite happy to do
> 
>   name.href=
> 
> (which NS didn't like)
> 
> Do I have to do browser sniffing even for something this trivial?
> 
> Ta for any help and for those with some time off for Easter, happy holidays!
> 
> Bj
> 
> ____ • The WDVL Discussion List from WDVL.COM • ____
> To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
> use the web interface http://e-newsletters.internet.com/discussionlists.html/
>        Send Your Posts To: wdvltalk@lists.wdvl.com
> To change subscription settings, add a password or view the web interface:
> http://intm-dl.sparklist.com/read/?forum=wdvltalk
> 
> ________________  http://www.wdvl.com  _______________________
> 
> You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> To unsubscribe via postal mail, please contact us at:
> Jupitermedia Corp.
> Attn: Discussion List Management
> 475 Park Avenue South
> New York, NY 10016
> 
> Please include the email address which you have been contacted with.
>

____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
       Send Your Posts To: wdvltalk@lists.wdvl.com
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: unknown lmsubst tag argument: ''
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to