Hmm... maybe instead of this line,
oBrowser.loadURI("mailto:"+ gAuthorEmail, "", "UTF-8")
Try this instead:
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE; var uri = "mailto:" + gAuthorEmail; oBrowser.webNavigation.loadURI(uri, loadFlags, null, null, null);
-Darin
Jeremy Gillick wrote:
Sorry for not providing more information.
I have created a Mozilla toolbar (http://jgillick.100freemb.com/) that works for both Mozilla and Firefox. I going to add a button in the options dialog to allow somebody to send me an email. The button will be labeled "Contact the Author", and when clicked should envoke a mailto: url in the browser. In other words, clicking on the button should open their default email client, ready to send an email to my address, just as if you entered mailto:[EMAIL PROTECTED] in the browser's location field.
Thanks, Jeremy
"Darin Fisher" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I'm not sure I understand your question. It might help if I understood how you are launching your application. Is it the case that you are installing your application in the Mozilla chrome directory, and then launching it with the -chrome argument? Or, are you using a stripped down version of Mozilla with your own .exe file? If the latter, then your apps preference settings would be separate from the preferences for some other installation of Mozilla on the system.
-Darin
Jeremy Gillick wrote:
Would doing this affect the user in the future? Would it change settings that may be useful to that user?
Thanks, Jeremy
"Darin Fisher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
Jeremy Gillick wrote:like
In my current XUL app, I have a 'Contact Author' button, that I would
error.to open an email client, via mailto. For some reason it throws me an
location:Below is my code:
try{ var oBrowser = window.getBrowser(); oBrowser.loadURI("mailto:"+ gAuthorEmail, "", "UTF-8"); }catch(err){alert(err)}
The error I'm getting is: "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebNavigation.loadURI] nsresult: 0x8000400g (NS_ERROR_FAILURE)
lineJS frame :: chrome://global/content/bindings/browser.xml :: loadURIWithFlags ::
159 data: no"
Any ideas or better ways to do this?
Thanks, Jeremy
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
it sounds like your application might have the code for the mailto: protocol handler. however, it seems to be lacking the chrome for mailnews, and probably you don't want to run mailnews from within your application ;-) it seems like you need to do something to ensure that mailto: URLs are handled by the unknown protocol handler. to force that to happen, try setting this pref:
pref("network.protocol-handler.external.mailto", true);
also, if you are running under linux, you'd probably want to make sure this pref is set:
pref("network.protocol-handler.expose-all", false);
that way, your application will fail to handle x-remote openURL requests. if you want some of your protocol handlers to be invoked via x-remote, then you can combine this pref with multiple prefs of the following form:
pref("network.protocol-handler.expose.x-my-protocol", true);
let me know if this doesn't do the trick.
-darin
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
