Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

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

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

Comments

@aristotelos
Copy link

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
Copy link
Author

Please! Could somebody respond to this issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants