MozillaZine

mailto: link in XUL

Talk about add-ons and extension development.
ericjung
 
Posts: 846
Joined: August 4th, 2003, 9:32 am

Post Posted February 25th, 2005, 12:26 pm

Hi,
I'm looking for a way to create a <b>mailto:</b> link in XUL which doesn't first open a window. Right now I have this:
Code: Select all
<text value="mail the author" style="color: blue; cursor: pointer" onclick="window.open('mailto:foobar@yahoo.com?subject=firefox');"/>

but this code opens an empty browser and then opens my email application's message composer. Is there a way to say something like:
Code: Select all
onclick="mailto:foobar@yahoo.com?subject=firefox;"

note the lack of window.open()?

Thank you in advance for any help,
grimholtz

asqueella
 
Posts: 4019
Joined: November 16th, 2003, 3:05 am
Location: Russia, Moscow

Post Posted February 25th, 2005, 1:03 pm

take a look at MailIntegration object in browser.js, it may help you.

ericjung
 
Posts: 846
Joined: August 4th, 2003, 9:32 am

Post Posted February 25th, 2005, 2:29 pm

Thanks, asqueella.

I created an article about it here, but I don't know how to categorize it. Can you tell me? Last time you just did it for me (here), but you never told me what to do. Try as I might, I can't figure it out... so I'm asking yet again.

-grimholtz

asqueella
 
Posts: 4019
Joined: November 16th, 2003, 3:05 am
Location: Russia, Moscow

Post Posted February 25th, 2005, 4:46 pm

That's a good question. You correctly linked it from Example code page, but it's not clear whether we want to use the Dev : Extensions : ... prefix. The name you chose is ok for the time being.

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted September 18th, 2006, 1:09 pm

Sorry for bumping a really old thread, but does this not work? (Did it not work when you guys were discussing this?)
Code: Select all
 <label href="mailto:me@example.com" class="text-link">Mail me</label>

ericjung
 
Posts: 846
Joined: August 4th, 2003, 9:32 am

Post Posted September 18th, 2006, 6:28 pm

Don't remember (that was 1 yr 7 months ago!). How old is the href attribute?

old np
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted September 19th, 2006, 7:59 am


ericjung
 
Posts: 846
Joined: August 4th, 2003, 9:32 am

Post Posted September 19th, 2006, 9:01 am

Doh!

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests