Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

dataType needs to be set on $.ajax calls for apps using file:/// #1308

Closed
rmanalan opened this Issue · 1 comment

2 participants

@rmanalan

I'm building a PhoneGap app using jQM and found that the $.ajax call inside $.mobile.changePage does not set the dataType to "html." Because of this, webkit loads the page (located at file://some/path//page.html) as a "Document" object rather than just straight up html. jQM expects the response to be an html string rather than a Document object. This causes line 2057 (in jqm 1.0a3) to fail to find the element:

to = all.find('[data-role="page"], [data-role="dialog"]').first();

I'm guessing that we need to set the dataType to always be "html" since $.mobile.changePage will always be retrieving an html page.

@toddparker

I'm guessing this is with alpha 3, right? We just landed a fix for this and a few other PhoneGap issues recently. This will be in alpha 4...coming later this week!

Issue here:
https://github.com/jquery/jquery-mobile/issuesearch?state=closed&q=phonegap#issue/991

You can test on the latest code here:
http://jquerymobile.com/test/

@toddparker toddparker closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.