Like the computer's hostname. But not localhost.
Author: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19747
dcc99617-32d9-48b4-a31d-
7c20da2025e4
g.tb = document.getElementById('wsname');
+ var dnsService = Components.classes["@mozilla.org/network/dns-service;1"]
+ .createInstance(Components.interfaces.nsIDNSService);
+
render_menulist();
document.getElementById('register_btn').disabled = false;
document.getElementById('wsname').disabled = false;
- document.getElementById('wsname').value = '';
+ if(dnsService.myHostName && dnsService.myHostName.toLowerCase() != 'localhost')
+ g.tb.value = dnsService.myHostName;
+ else
+ g.tb.value = '';
document.getElementById('wsname').focus();
}