Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #50767
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.024 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'output': 0.05; 'subsequent': 0.05; '(using': 0.07; 'think,': 0.07; 'cookie': 0.09; 'pages.': 0.09; 'similar,': 0.09; 'python': 0.11; 'changes': 0.15; '(9,': 0.16; '(note': 0.16; 'chrome,': 0.16; 'cookies,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'index.html': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'wed,': 0.18; 'load': 0.23; 'sort': 0.25; 'script': 0.25; 'pass': 0.26; 'required.': 0.27; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'on,': 0.29; 'am,': 0.29; 'xml': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'too.': 0.31; 'cgi': 0.31; 'dom': 0.31; 'embed': 0.31; 'end,': 0.31; 'trivial': 0.31; 'handled': 0.32; 'run': 0.32; 'plain': 0.33; 'something': 0.35; 'operations': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'interact': 0.36; 'doing': 0.36; 'possible': 0.36; 'server': 0.38; 'ajax': 0.38; 'checks': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'recent': 0.39; 'to:addr:python.org': 0.39; 'users': 0.40; 'how': 0.40; 'full': 0.61; 'new': 0.61; 'browser': 0.61; "you're": 0.61; 'back': 0.62; 'information': 0.63; 'different': 0.65; 'request.': 0.70; 'internet': 0.71; 'jul': 0.74; 'differences,': 0.84; 'easier,': 0.84; 'explorer': 0.84; 'geo': 0.84; 'geolocation': 0.84; 'that),': 0.91; 'outcome': 0.93; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=j6pvorOU1bX1JeWIR2yoX5tee38KogZN5x5xcyxf7yY=; b=J4Jxp4jhty27E5FAZyZDREI6oR857cPons1uu+ja5XHHrG/3IKJ2L58GZA4oi43C35 p5Uw3GDiZMtqETWNWngYWp/tWMtAYE0z8ivA+RvEKAK5iYdxfyaBqdt+a8UC85gQSC8V jrWPyu29Z7XvIazhs3WPzAgLtpRQHJUf8xPkL+ByIPJFM8ITpNaguMj4Ss+4p7774Lf9 u3MvdP5opr8U0VWCZsBwlxuRQluP1XkWvPYZqW3zB/C7Z3WaPZjm+UoRViycrUTiEMZG BhrpWldsSSYzBGtp6KfxM6cepaTx26LvXA674UMRU+CbM3kg4vtYlGQTtXI9PGfDxCq+ PXvA== |
| MIME-Version | 1.0 |
| X-Received | by 10.58.214.105 with SMTP id nz9mr1219960vec.58.1374022716230; Tue, 16 Jul 2013 17:58:36 -0700 (PDT) |
| In-Reply-To | <22qbu8tkujd2s0e8ptvhmmt06nlfonh5p4@4ax.com> |
| References | <krp37d$jt$2@news.grnet.gr> <mailman.4638.1373643167.3114.python-list@python.org> <krp8nl$9kb$1@news.grnet.gr> <krpb3c$eol$1@news.grnet.gr> <mailman.4659.1373666847.3114.python-list@python.org> <krqop8$eol$2@news.grnet.gr> <mailman.4680.1373734493.3114.python-list@python.org> <krs3jj$vnq$1@news.grnet.gr> <roy-225D18.14190013072013@70-1-84-166.pools.spcsdns.net> <krs5uc$6ht$1@news.grnet.gr> <mailman.4687.1373756278.3114.python-list@python.org> <ks47p8$pbp$1@news.grnet.gr> <22qbu8tkujd2s0e8ptvhmmt06nlfonh5p4@4ax.com> |
| Date | Wed, 17 Jul 2013 10:58:36 +1000 |
| Subject | Re: GeoIP2 for retrieving city and region ? |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4789.1374022718.3114.python-list@python.org> (permalink) |
| Lines | 41 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1374022718 news.xs4all.nl 15904 [2001:888:2000:d::a6]:41053 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:50767 |
Show key headers only | View raw
On Wed, Jul 17, 2013 at 10:51 AM, Dennis Lee Bieber <wlfraed@ix.netcom.com> wrote: > On Tue, 16 Jul 2013 22:43:35 +0300, ??????? <nikos@superhost.gr> declaimed > the following: > >> >>Lest say i embed inside my index.html the Javascript Geo Code. >> >>Is there a way to pass Javascript's outcome to my Python cgi script somehow? >> >>Can Javascript and Python Cgi somehow exchnage data? > > Using plain CGI is going to be painful -- since /everything/ is handled > a whole new page request. You would have to handle session cookies, etc. > > Your "index.html" would attempt to run the JavaScript (note that some > users may have JavaScript turned off -- how will you handle that), if it > gets information it would have to do a "GET index2.html?lat=xxx?long=yyy" > or something similar, which will result in a new page load on the user -- > hopefully with a cookie set so you know NOT to run the geolocation code on > subsequent pages. > > AJAX is a process to allow JavaScript on the browser to interact with a > server (using XML data structures), and likely use DOM operations in the > browser (and the last time I did something on this nature, I had to have > different code for Internet Explorer vs Firefox, and don't know of > Chrome/Opera share one of the others calls) to make changes on the web page > without doing a full submit/render operation AJAX changes the client end, but not the server (well, you might change the server's output format to make it easier, but it's not essential). So you *can* still use the CGI that you're familiar with. For reference, Firefox/Chrome/Opera/Safari are all pretty much identical for this sort of work; and the recent IEs (9, I think, and 10) are following them too. There are trivial differences, but for the basics, it's possible to support IE8+, Chrome, Firefox back as far as the Iceweasel from Debian Squeeze (I think that's Ff 3.5), and so on, all from the same code. No per-browser checks required. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-12 17:18 +0300
Re: GeoIP2 for retrieving city and region ? Dave Angel <davea@davea.name> - 2013-07-12 11:32 -0400
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-12 18:52 +0300
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-12 19:32 +0300
Re: GeoIP2 for retrieving city and region ? Grant Edwards <invalid@invalid.invalid> - 2013-07-12 16:38 +0000
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-13 02:47 +1000
Re: GeoIP2 for retrieving city and region ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-12 19:04 -0400
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-13 08:48 +0300
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-13 15:53 +1000
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-13 09:07 +0300
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-13 16:22 +1000
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-13 09:28 +0300
Re: GeoIP2 for retrieving city and region ? Lele Gaifax <lele@metapensiero.it> - 2013-07-13 10:12 +0200
Re: GeoIP2 for retrieving city and region ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-13 12:48 -0400
Re: GeoIP2 for retrieving city and region ? Roy Smith <roy@panix.com> - 2013-07-13 12:59 -0400
Re: GeoIP2 for retrieving city and region ? Wayne Werner <wayne@waynewerner.com> - 2013-07-13 13:35 -0500
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-13 10:36 +1000
Re: GeoIP2 for retrieving city and region ? Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-12 19:42 -0400
Re: GeoIP2 for retrieving city and region ? Ian Kelly <ian.g.kelly@gmail.com> - 2013-07-12 11:19 -0600
Re: GeoIP2 for retrieving city and region ? Terry Reedy <tjreedy@udel.edu> - 2013-07-12 18:07 -0400
Re: GeoIP2 for retrieving city and region ? MRAB <python@mrabarnett.plus.com> - 2013-07-12 23:07 +0100
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-13 08:32 +0300
Re: GeoIP2 for retrieving city and region ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-13 12:54 -0400
Re: GeoIP2 for retrieving city and region ? Roy Smith <roy@panix.com> - 2013-07-13 13:09 -0400
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-13 20:43 +0300
Re: GeoIP2 for retrieving city and region ? Roy Smith <roy@panix.com> - 2013-07-13 14:19 -0400
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-13 21:23 +0300
Re: GeoIP2 for retrieving city and region ? Roy Smith <roy@panix.com> - 2013-07-13 14:30 -0400
Re: GeoIP2 for retrieving city and region ? Michael Torrie <torriem@gmail.com> - 2013-07-13 16:57 -0600
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-16 22:43 +0300
Re: GeoIP2 for retrieving city and region ? Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-16 15:51 -0400
Re: GeoIP2 for retrieving city and region ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-16 20:51 -0400
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-17 10:58 +1000
Re: GeoIP2 for retrieving city and region ? Tim Chase <python.list@tim.thechases.com> - 2013-07-14 13:32 -0500
Re: GeoIP2 for retrieving city and region ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-13 14:21 -0400
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-13 21:28 +0300
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-14 09:12 +1000
Re: GeoIP2 for retrieving city and region ? Wayne Werner <wayne@waynewerner.com> - 2013-07-13 13:46 -0500
Re: GeoIP2 for retrieving city and region ? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-07-13 11:17 -0700
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-15 16:25 +0300
Re: GeoIP2 for retrieving city and region ? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-07-15 20:34 -0400
Re: GeoIP2 for retrieving city and region ? Michael Torrie <torriem@gmail.com> - 2013-07-15 20:48 -0600
Re: GeoIP2 for retrieving city and region ? alex23 <wuwei23@gmail.com> - 2013-07-17 10:07 +1000
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-14 03:03 +1000
Re: GeoIP2 for retrieving city and region ? Michael Torrie <torriem@gmail.com> - 2013-07-12 16:15 -0600
Re: GeoIP2 for retrieving city and region ? Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-12 12:24 -0400
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-14 08:18 +0300
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-14 15:24 +1000
Re: GeoIP2 for retrieving city and region ? Νικόλας <nikos@superhost.gr> - 2013-07-14 10:51 +0300
Re: GeoIP2 for retrieving city and region ? Chris Angelico <rosuav@gmail.com> - 2013-07-13 02:41 +1000
csiph-web