Re: [web2py] Re: jquery mobile, google maps and routes.py

2011-04-03 Thread Jonathan Lundell
On Apr 3, 2011, at 4:01 PM, ChrisM wrote:
> 
> I was trying to get around the fact that jquery inserts the # into the
> url, so the
> correct html template is not loaded, this does not happen if you use
> multi page
> html file - oh yes, this is for a jquery mobile page.

The hash URL never gets to the server. It's a peculiarity of the way jQuery 
Mobile does its page navigation. This stuff is all handled on the client side. 
If you're actually seeing the URL with the hash at the server, something is 
wrong. I think.

http://jquerymobile.com/test/docs/pages/docs-navmodel.html


> 
> On Apr 3, 3:54 pm, Jonathan Lundell  wrote:
>> On Apr 3, 2011, at 4:58 AM, ChrisM wrote:
>> 
>> 
>> 
>>> update - seems to only work if you have multiple page definitions in
>>> same html file.
>> 
>> I'd avoid using # in a URL, because a browser is likely to parse it as a 
>> fragment (anchor) identifier.
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> On Apr 2, 1:02 pm, ChrisM  wrote:
 i am using the examples from;
>> 
 I have a incoming request at
>> 
 http://localhost:8000/#/init/default/map_geoloc
>> 
 in routes.py i have:
>> 
 routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
  (r'.*:/robots.txt', r'/examples/static/robots.txt'),
  (r'.*:/#/init/default/map_geoloc', r'/init/default/
 map_geoloc'),
  ((r'.*http://otherdomain.com.*(?P.*)', r'/app/ctr
 \g')))
>> 
 doesn't seem to work as i have a google map which will load at
>> 
 http://localhost:8000/init/default/map_geoloc
>> 
 but through a jquery link
>> 
 http://localhost:8000/#/init/default/map_geoloc
>> 
 with the additional # google map will not load, anyone else solved
 this one?
>> 
 Regards
 Chrism




[web2py] Re: jquery mobile, google maps and routes.py

2011-04-03 Thread ChrisM
I was trying to get around the fact that jquery inserts the # into the
url, so the
correct html template is not loaded, this does not happen if you use
multi page
html file - oh yes, this is for a jquery mobile page.

On Apr 3, 3:54 pm, Jonathan Lundell  wrote:
> On Apr 3, 2011, at 4:58 AM, ChrisM wrote:
>
>
>
> > update - seems to only work if you have multiple page definitions in
> > same html file.
>
> I'd avoid using # in a URL, because a browser is likely to parse it as a 
> fragment (anchor) identifier.
>
>
>
>
>
>
>
>
>
> > On Apr 2, 1:02 pm, ChrisM  wrote:
> >> i am using the examples from;
>
> >> I have a incoming request at
>
> >>http://localhost:8000/#/init/default/map_geoloc
>
> >> in routes.py i have:
>
> >> routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
> >>              (r'.*:/robots.txt', r'/examples/static/robots.txt'),
> >>              (r'.*:/#/init/default/map_geoloc', r'/init/default/
> >> map_geoloc'),
> >>              ((r'.*http://otherdomain.com.*(?P.*)', r'/app/ctr
> >> \g')))
>
> >> doesn't seem to work as i have a google map which will load at
>
> >>http://localhost:8000/init/default/map_geoloc
>
> >> but through a jquery link
>
> >>http://localhost:8000/#/init/default/map_geoloc
>
> >> with the additional # google map will not load, anyone else solved
> >> this one?
>
> >> Regards
> >> Chrism


Re: [web2py] Re: jquery mobile, google maps and routes.py

2011-04-03 Thread Jonathan Lundell
On Apr 3, 2011, at 4:58 AM, ChrisM wrote:
> 
> update - seems to only work if you have multiple page definitions in
> same html file.

I'd avoid using # in a URL, because a browser is likely to parse it as a 
fragment (anchor) identifier.

> 
> On Apr 2, 1:02 pm, ChrisM  wrote:
>> i am using the examples from;
>> 
>> I have a incoming request at
>> 
>> http://localhost:8000/#/init/default/map_geoloc
>> 
>> in routes.py i have:
>> 
>> routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
>>  (r'.*:/robots.txt', r'/examples/static/robots.txt'),
>>  (r'.*:/#/init/default/map_geoloc', r'/init/default/
>> map_geoloc'),
>>  ((r'.*http://otherdomain.com.*(?P.*)', r'/app/ctr
>> \g')))
>> 
>> doesn't seem to work as i have a google map which will load at
>> 
>> http://localhost:8000/init/default/map_geoloc
>> 
>> but through a jquery link
>> 
>> http://localhost:8000/#/init/default/map_geoloc
>> 
>> with the additional # google map will not load, anyone else solved
>> this one?
>> 
>> Regards
>> Chrism




[web2py] Re: jquery mobile, google maps and routes.py

2011-04-03 Thread ChrisM
update - seems to only work if you have multiple page definitions in
same html file.

On Apr 2, 1:02 pm, ChrisM  wrote:
> i am using the examples from;
>
> I have a incoming request at
>
> http://localhost:8000/#/init/default/map_geoloc
>
> in routes.py i have:
>
> routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
>              (r'.*:/robots.txt', r'/examples/static/robots.txt'),
>              (r'.*:/#/init/default/map_geoloc', r'/init/default/
> map_geoloc'),
>              ((r'.*http://otherdomain.com.*(?P.*)', r'/app/ctr
> \g')))
>
> doesn't seem to work as i have a google map which will load at
>
> http://localhost:8000/init/default/map_geoloc
>
> but through a jquery link
>
> http://localhost:8000/#/init/default/map_geoloc
>
> with the additional # google map will not load, anyone else solved
> this one?
>
> Regards
> Chrism