[OPEN-ILS-GENERAL] Staff client intro page - opening links in default browser

Jason Boyer jasonb at myjclibrary.org
Mon Oct 19 11:19:43 EDT 2009


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

jasonb at myjclibrary.org
p (812) 522-3412 ext. 227
f (812) 522-5456


On Mon, Oct 19, 2009 at 9:16 AM, Jason Boyer <jasonb at myjclibrary.org> 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
>
> jasonb at myjclibrary.org
> p (812) 522-3412 ext. 227
> f (812) 522-5456
>
>
>
> On Fri, Oct 16, 2009 at 3:38 PM, Jeremy Buhler <jeremy.buhler at gmail.com>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
>> jbuhler at sitka.bclibraries.ca
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20091019/6d9edf85/attachment.htm 


More information about the Open-ils-general mailing list