The following worked for me when I put it in server/main/test.html:
<html>
<head>
<title>test.html</title>
<script type='text/javascript'>
function openInDefBrowser(aElem) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var ioservice = Components.classes["@mozilla.org/network/io-service;1"
].getService(Components.interfaces.nsIIOService);
var extps = Components.classes["@
mozilla.org/uriloader/external-protocol-service;1"
].getService(Components.interfaces.nsIExternalProtocolService);
var uriToOpen = ioservice.newURI(aElem.href, null, null);
extps.loadURI(uriToOpen, null);
return false;
}
</script>
</head>
<body>
<a href='http://www.google.com/' onclick='return
openInDefBrowser(this);'>Default
Browser</a>
</body>
</html>Though it asks what program to open it in, the default or one that you choose. There's a way around that, but it involves modifying the prefs for the staff client, so it may be lost on an upgrade and would need re-done on every new install. Jason -- Jason Boyer, IT Specialist Jackson County Public Library 303 W Second St Seymour, IN 47274 [email protected] p (812) 522-3412 ext. 227 f (812) 522-5456 On Mon, Oct 19, 2009 at 9:16 AM, Jason Boyer <[email protected]> wrote: > This page should help. Take note of the unfrozen interface warning though, > Apparently it's not changed since 1.9, (used in EG 1.6) but I don't know if > it will still work in 1.8 (EG < 1.6). > https://developer.mozilla.org/en/Opening_a_Link_in_the_Default_Browser > > Jason > > -- > Jason Boyer, IT Specialist > Jackson County Public Library > 303 W Second St > Seymour, IN 47274 > > [email protected] > p (812) 522-3412 ext. 227 > f (812) 522-5456 > > > > On Fri, Oct 16, 2009 at 3:38 PM, Jeremy Buhler <[email protected]>wrote: > >> In our experience links from the staff client intro or welcome page open >> within the staff client environment, either overwriting the current tab or >> in >> a new tab. We'd like to open certain links in the user's default browser >> instead. >> >> I looked at nrcan's welcome page but didn't see any clues. Not urgent but >> I'd >> love to hear if someone has a tip to make this work. >> >> Thanks, >> Jeremy >> >> -- >> Jeremy Buhler >> Trainer/Help Desk Specialist >> Sitka Evergreen Implementation >> [email protected] >> > >
