{"id":109,"date":"2011-03-07T16:40:16","date_gmt":"2011-03-07T16:40:16","guid":{"rendered":"http:\/\/www.sitekickr.com\/blog\/?p=109"},"modified":"2011-03-07T16:40:37","modified_gmt":"2011-03-07T16:40:37","slug":"jquery-mobile-page-undefined","status":"publish","type":"post","link":"https:\/\/www.sitekickr.com\/blog\/jquery-mobile-page-undefined\/","title":{"rendered":"jQuery Mobile &#8211; l.data(&#8220;page&#8221;) undefined"},"content":{"rendered":"<p>In our experiments with jQuery Mobile, specifically when applying jQuery Mobile to an existing website, we&#39;ve encountered one error more than any other. That error is the<em> l.data(&quot;page&quot;) undefined<\/em><\/p>\n<p>It appears that, due to the way jQuery Mobile handles page loading (via AJAX), redirects within your code throw a wrench into the works.<\/p>\n<p>For example, if after submitting a form, you automatically redirect the user to a &quot;Thank You&quot; page, jQuery Mobile is unaware of this action and may throw the error above.<\/p>\n<p>One way around this is to avoid the redirect, and simply display a &quot;Thank You&quot; message within your processing script.<\/p>\n<p>To illustrate this in ColdFusion, you would replace the following code:<\/p>\n<p><code>&lt;cflocation url=&quot;thank-you.cfm&quot;&gt;<br \/>\n\t<\/code><\/p>\n<p>with<\/p>\n<p><code>&lt;p&gt;Thank you for your request.&lt;\/p&gt;<br \/>\n\t&lt;a href=&quot;\/&quot;&gt;Return Home&lt;\/a&gt;<br \/>\n\t<\/code><\/p>\n<p>\n\tWhich allows jQuery Mobile to continue loading pages via AJAX.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our experiments with jQuery Mobile, specifically when applying jQuery Mobile to an existing website, we&#39;ve encountered one error more than any other. That error&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"amp_status":""},"categories":[5],"tags":[47],"_links":{"self":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/109"}],"collection":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":2,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":111,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/posts\/109\/revisions\/111"}],"wp:attachment":[{"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sitekickr.com\/blog\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}