Page with Navbar gives "Error Loading Page" when it is loaded from a form on the previous page
Are you able to have a form <form action="search.html" method="post"> load the next page (search.html) which will have a navbar with pages embed within it (data-role="page")? Let me give an example of the page:
- <!-- index.html -->
- <div data-role="page">
- <form action="search.html" method="post">
- <input type="submit" value="Submit" />
- </form>
- </div>
- <!-- search.html -->
- <div data-role="page" id="search">
- <div data-role="header"><h1>My Application</h1></div>
- <div data-role="content"></div>
- <div data-role="footer">
- <div data-role="navbar">
- <ul>
- <li><a href="#search" class="ui-btn-active">Search</a><li>
- <li><a href="#location">My Location</a><li>
- <li><a href="#favorites">Favorites</a><li>
- </ul>
- </div>
- </div>
- </div>
- <div data-role="page" id="location">
- <div data-role="header"><h1>My Application</h1></div>
- <div data-role="content"></div>
- <div data-role="footer">
- <div data-role="navbar">
- <ul>
- <li><a href="#search">Search</a><li>
- <li><a href="#location" class="ui-btn-active">My Location</a><li>
- <li><a href="#favorites">Favorites</a><li>
- </ul>
- </div>
- </div>
- </div>
- <div data-role="page" id="favorites">
- <div data-role="header"><h1>My Application</h1></div>
- <div data-role="content"></div>
- <div data-role="footer">
- <div data-role="navbar">
- <ul>
- <li><a href="#search">Search</a><li>
- <li><a href="#location">My Location</a><li>
- <li><a href="#favorites" class="ui-btn-active">Favorites</a><li>
- </ul>
- </div>
- </div>
- </div>
So, my landing page submits a form and the search.html page is parsed. When I click on an item in the navbar, jQuery displays the dialog "Error Loading Page". I noticed, when I place data-ajax="false" on the form, the navbar works. Is this the only way to do this?
Any help is much appreciated!
Regards,
Ben