SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Non-Member
    Join Date
    May 2005
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    display country javascript

    I need javascript which will display user's country on webpage. Can you help me find it?

  2. #2
    SitePoint Zealot Jadusoft.com's Avatar
    Join Date
    May 2005
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do this in php or if you really want in javascript then search on yahoo or google it.
    Purchase any JaduSoft products in 10$ only offer ends 1st July
    Try a Live demo before you purchase, Best software.

  3. #3
    SitePoint Aficionado JVLB's Avatar
    Join Date
    Jan 2002
    Location
    N 44 56.537' W 123 3.683'
    Posts
    1,127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this:

    Code:
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
      <html>
      <head>
      <title>Untitled</title>
      <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
      </head>
      <body>
      <script type="text/javascript">
      alert(navigator.language? navigator.language : navigator.browserLanguage);
      </script>
      </body>
      </html>
    navigator.language is for Netscape, et. al, and navigator.browserLanguage is for IE.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •