Problem
I cannot load linked pages with parameters via Ajax in jQuery mobile.
Like: http://www.sampleurl.com/tool.dll?name=first&more=parameters
Details
I’m using jQuery Mobile 1.0b3
I don’t refer to in-page navigation with hashtags. I intend to load another webpage (separate html file). So as far as I know there shouldn’t be a problem with JQM searching the linked website within the current page.
In some cases I have to reference a DLL which is returning the HTML document as response.
Unfortunately I cannot access these pages with jQuery Mobile using Ajax.
To give an example: I am on the following website
http://www.sampleurl.com/tool.dll?name=first&more=parameters
and I want to access another website like this:
<a href="/tool.dll?name=second&more=parameters"> Link </a>
This is not working with Ajax enabled. I have to force non-ajax with the attribute rel="external".
Is it not possible to access liks with parameters in JQM this way? I’d like to use the built-in loading notification for pages. What am I missing?
Unfortunately I haven’t found a solution in similiar questions.
Code samples
<!-- This is working, but will not get me a loading notification on mobile devices -->
<a rel="external" data-ajax="false" href="/tool.dll?name=this%20one&more=parameters">
Link
</a>
<!-- This is not working -->
<a href="/tool.dll?&name=second&more=parameters">
Link
</a>
<!-- Neither is this working -->
<a href="http://www.sampleurl.com/tool.dll?name=this%20one&more=parameters">
Link
</a>
New insights (edit)
For some reason JQM is stuck at loading the page because of this line within the website:
<input type="date" name="date" id="date" value="" />
The issue is the attribute type="date"! With an text-field the page loads fine via ajax.
The page itself is working fine with jQuery Mobile. The date-input just prevents the page from loading via ajax.
I haven’t found a solution for this problem, yet. The empty value attribute is not the problem.
Explanation
This issue is not related to GET parameters and the ajax request.
The problem is caused by the datepicker plugin for jQuery Mobile, when included in the landing page.
If you have to include the script always, you will need to disabled the use of ajax via:
rel="external" data-ajax="false"Solution
Landing page
Calendar page