Add "contentType" to settings for $.mobile.changePage with "data" argument #5296

Closed
aristotelos opened this Issue Nov 16, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@aristotelos

As the $.mobile.changePage supports a data argument, it should also support a contentType argument. For example:

            $.mobile.changePage(
                mstrUrl,
                {
                    type: "post",
                    data: "<hello-world />",
                    contentType: "text/xml"
                }
            );

This can be achieved easily by changing the following lines in the jquery.mobile-1.2.0.js from:

        // Load the new page.
        $.ajax({
            url: fileUrl,
            type: settings.type,
            data: settings.data,
            dataType: "html",

To:

        // Load the new page.
        $.ajax({
            url: fileUrl,
            type: settings.type,
            data: settings.data,
            contentType: settings.contentType,
            dataType: "html",
@aristotelos

This comment has been minimized.

Show comment Hide comment
@aristotelos

aristotelos Mar 1, 2013

Please! Could somebody respond to this issue?

Please! Could somebody respond to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment