I did something like the following --- subject and anExpert both hold
strings:

td.innerHTML = "<a href='mailto:"; + email + "?subject=" + subject + "'>" +
anExpert + "</a>";
td.firstChild.click();

This works in IE and Opera, but not in Mozilla/Netscape.
I splitted the last line into:

a = td.firstChild;
a.click();

and then inspected it with Venkman and DOM Inspector.
The DOM Inspector told me that a is indeed an anchor-element
but on the click I got in Venkman an exception

(I do not want to reconstruct it now becauseof a bug in Venkman: displaying
source code lines breaks off after a line:
var experts = .... an 8000-bytes string
and do not have the patience to change that just for a test.)

I have changed the last line now into:
if (a.click) a.click();

and ask my users with Gecko/Netscape to click on the mailto themselves.

"Brendan Eich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Peter J. Veger wrote:
>
> >>About the DOM:
> >>http://www.mozilla.org/docs/dom/domref/
> >>But that's probably the same as the pdf document you mentioned. Should
> >>pretty much specify the Gecko DOM implementation...
> >
> >
> > And here is stated that I should be able to click an anchor-element...
>
> Have you tried synthesizing a CLICK event and sending it to the element?
>
> Note cross-post with followup-to: set.
>
> /be


_______________________________________________
mozilla-documentation mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-documentation

Reply via email to