You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
I've got a jqm app running in phonegap. The main index.html, js, and css files are all stored locally. The index page consists of one jqm page (data-role=page), another div whose data-role is set to 'page' for rendering but is displayed as a stacked panel with a list of links, and several jqm dialog pages. When the app first starts up, the base of the document is set to a local file, e.g. file:///my/path/to/a/index.html, which is appropriate for loading all the local js and css files that are referenced from index.html with relative paths.
When the document is loaded, though, the base is set to the server to start loading new jqm pages with actual content. This works fine both using $.mobile.base.set() or manually finding and setting the href of the base tag.
This is when the stacked panel is shown. Almost every page from the server has a button to show the stack panel, and it is populated with a list of links to other jqm pages, all with relative paths to the server in their href's. As such, it's easiest if each jqm page has an href like, href="#stackedpanel" and a handler then catches the 'pagebeforechange' event, calls preventDefault(), and shows the stacked panel. So far so good.
When any of the links in the stacked panel are clicked, however, and not until they're clicked, the base tag reverts to the original file://my/path/to/a/index.html before the ajax call is made, which then fails. So, for instance, with a server, http://mysite.com/, and a relative path in the stacked panel of /foo/bar/, it tries to then load file:///foo/bar.
I can understand that this stack panel is originally in the local file context, but by manually setting the base, I've specified otherwise. Shouldn't it respect that?
The text was updated successfully, but these errors were encountered:
It's hard for us to tack the base tag value and know when it's been changed. Though we could for instance say "It's different than what we have recorded from the page load, don't touch". I pushed a branch that's being saved for post 1.2 that supports the disabling of our base reset for folks who want to manage it manually. The setting is dynamic so if you want to disable it at some time after the initial load that would work.
I've got a jqm app running in phonegap. The main index.html, js, and css files are all stored locally. The index page consists of one jqm page (data-role=page), another div whose data-role is set to 'page' for rendering but is displayed as a stacked panel with a list of links, and several jqm dialog pages. When the app first starts up, the base of the document is set to a local file, e.g. file:///my/path/to/a/index.html, which is appropriate for loading all the local js and css files that are referenced from index.html with relative paths.
When the document is loaded, though, the base is set to the server to start loading new jqm pages with actual content. This works fine both using $.mobile.base.set() or manually finding and setting the href of the base tag.
This is when the stacked panel is shown. Almost every page from the server has a button to show the stack panel, and it is populated with a list of links to other jqm pages, all with relative paths to the server in their href's. As such, it's easiest if each jqm page has an href like, href="#stackedpanel" and a handler then catches the 'pagebeforechange' event, calls preventDefault(), and shows the stacked panel. So far so good.
When any of the links in the stacked panel are clicked, however, and not until they're clicked, the base tag reverts to the original file://my/path/to/a/index.html before the ajax call is made, which then fails. So, for instance, with a server, http://mysite.com/, and a relative path in the stacked panel of /foo/bar/, it tries to then load file:///foo/bar.
I can understand that this stack panel is originally in the local file context, but by manually setting the base, I've specified otherwise. Shouldn't it respect that?
The text was updated successfully, but these errors were encountered: