-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Load Page via AJAX ignores Sub-Page #1995
Comments
Confirmed. This is kinda annoying as I do like to have separate documents for my pages, but some pages just belongs together in a single document (like a "Remove ListItem" page and a "Confirm removal" dialog/page). |
This is the way it works now for technical reasons. We can look into making this work, probably after 1.0. |
Hi Todd, This issue is causing me grief too. I know the recommended approach is to return just one jQm page per HTTP response but it seems overkill to issue another server round trip for something as simple as a confirmation dialog so I'd like to return both of these page parts together. This approach works fine when I retrieve the page without ajax, but breaks (I get no dialog) when fetching via ajax so I'm currently having to disable ajax fetches for some parts of the site and so losing the nice transitions etc. Would you accept a pull request to implement multiple pages being returned via ajax? I'm quite tempted to have a go at fixing this unless you have some other approach in mind... |
It's a more complex issue to solve than just loading in the multiple pages because we need to deal with registering and tracking these pages in the navigation script. If you want to do a deep dive and try work work this out, that would be great if you submit a pull. |
@smoothcontract - when you say it breaks, what happens? I'm getting the same issue I believe: if a page fetched via ajax contains sub pages, those sub pages won't load at all if linked to from the page, via the usual jqm method of linking to the sub page's ID. Instead, the index page of the site loads again in their place. Presumably multi page layouts are still allowed (and in turn, linking to those sub pages), even when having been fetched via ajax? These two pages together form a test to illustrate the problem, if it's of any help: index.html: testPage.html: |
I'm really surprised this issue has been pushed to the back burner. It's quite confusing. The documentation implies this should work. Quoting from http://jquerymobile.com/test/docs/pages/page-links.html
|
https://github.com/jquery/jquery-mobile/wiki/Feature-Requests This is registered under feature requests in the wiki. |
If you load a Page via AJAX which has 1 or several Sub-Pages (with a hash-id) in it. Only the first with be added to the Document.
The text was updated successfully, but these errors were encountered: