[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying IP address?




On Thu, 1 Feb 1996, Dale Smith wrote:

> I have seen both cgi scripts and java apps. that display the users ip 
> address and information about the browser and OS that the client is 
> currently running. Is that functionality available in JS? Also, does the 
> time method display the time on the server or the time on the client? My 
> Web page is on a server in California, but I would like to display the 
> current time here in Austin, any ideas?
> 
> Dale Smith
> Austin, Tx.
> 

write('Your browser ID is ' + navigator.appname)

	This will display the long name of the browser. Currently since 
only Netscape supports JS, only Netscape would be displayed. Hopefully 
when other browsers adopt this technology, their names would be displayed 
as well.

write('The version number is ' + navigator.appversion)

	This will display (Macintosh; I; 68K). Macintosh might be 
replaced by Windows, SGI, etc. and is part of the navigator.appname

write('The code name is ' + navigator.appcodename)

	This will return Netscape if the broswer's appname is Mozilla, etc.

Hope this is helpful.

For the most recent documentation on the Javascript definitions, etc., 
get to the documentation through the link for the Handbook from within 
NS. Going to the Javascript page and browsing the documentation there, 
you will notice that it is not as updated as one available through the 
handbook. This is unfortunate and Netscape should put the exact same 
information in both places.

Best wishes,
SETH

_____________________________________________________________________
Seth D. Palmer, sdpalmer@panix.com                      QUE SERA SERF
DIGI.INTELLIGENTSIA, LTD.                              Life is feudal.