Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to Successfully Update Page Content via ajax
    text
    copied!<p>I have a mobile version of a website built in jQuery mobile and living on a dedicated "m.myurl" subdomain. The full desktop version of the site is in Wordpress. My goal is to have updates entered via Wordpress to the desktop site to show up dynamically on the mobile site as well. I am generating the page content from the individual pages of the desktop site via JSON feeds, and have confirmed that the JSON feeds are good (i.e.: if I enter their URL into a browser, I get a good JSON object). However, the AJAX call on the jQuery mobile site refuses to work. I have debugged to the point that I am not receiving any errors in my console, but when I attempt to log the response from the AJAX call to troubleshoot, it consistently shows in the log as undefined, so I am not receiving known good JSON objects. </p> <p>The functions I'm using to make the AJAX call are as follows: </p> <pre><code>function processResponse(response){ var update = $(response).find('content'); $('.content').append($(update).html()); };//ends processResponse function processJSON(url){ $.ajax({ url: url, data: null, success: processResponse, dataType: 'jsonp', });//ends ajax };//ends processJSON </code></pre> <p>I've set the three JSON URL's equal to variables, but have tried calling the function with the URL passed in instead of the variable, to no effect. The 'processJSON" function is called within the content div of each page section of the jQuery mobile index.html file within a $(document).ready.I'm using 'jsonp' as the dataType, as I assume that calling from a subdomain to a main-level domain would be considered a cross-domain call. That said, I'm trying to get this to work locally, and haven't placed it on a test server yet. </p> <p>Any assistance is appreciated. Thanks! </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload