Note that there are some explanatory texts on larger screens.

plurals
  1. PODynamic Links in jQuery Mobile lose formatting
    text
    copied!<p>I'm trying to use jQuery Mobile for a mobile website (after trying and ditching jQTouch) and I think this is going to work beautifully. However, I've run into a formatting issue when hyperlinking to a second page.</p> <p>I have a main index.php page which contains all of the static information I'm wanting to display. I'll have two links that will make SQL calls into a database for the information -- for these, I'm taking the code out of the index.php and calling a separate page: ucd.php. This second page load a dynamic listing that drills down into the database until they select the car they're looking for. My problem is when you're linked from the index page to ucd.php, the CSS formatting of the page is gone. If I load ucd.php on it's own, it formats properly. If I go index->ucd.php->list selection, index is formatted, ucd.php is NOT formatted, 1st dynamic list option IS formatted.</p> <p>One thing I did notice is, when ucd.php is called, it changes the URL in the address bar to "http://localhost/#ucd.php" -- not "http://localhost/ucd.php". From what I've read on the jQuery Mobile site, it does this to keep the history properly in the hash. Should that cause any formatting problems?</p> <p>(for space reasons, all pages start w/ and have the proper script loadings done. jQuery Touch 1.0a2, jQuery 1.4.4)</p> <pre><code>index.php: &lt;div id="mainpage" data-role="page" data-theme="a"&gt; &lt;div data-role="header" data-theme="a"&gt; &lt;h1&gt;Car Dealership&lt;/h1&gt; &lt;/div&gt;&lt;!-- header --&gt; &lt;div data-role="content"&gt; &lt;ul data-role="listview" data-inset="true" data-theme="a" data-dividertheme="a"&gt; &lt;li&gt;&lt;a href="ncd.php" data-transition="slide"&gt;Search New Cars&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php" data-transition="slide"&gt;Search Used Cars&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#service" data-transition="slide"&gt;Service/Parts Info&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#location" data-transition="slide"&gt;Find Us&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="tel:8888675309" data-transition="slide"&gt;Call Us @ 888-867-5309&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#hours" data-transition="slide"&gt;Hours of Operation&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- content --&gt; &lt;div data-role="footer" data-theme="a"&gt; &lt;h4&gt;Thanks for visiting us!&lt;/h4&gt; &lt;/div&gt;&lt;!-- footer --&gt; &lt;/div&gt; </code></pre> <p>I'm only pasting the outputted HTML code from the .php page</p> <pre><code>ucd.php: &lt;div id="ucdmain" data-role="page" data-theme="a"&gt; &lt;div data-role="header" data-theme="a"&gt; &lt;h1&gt;Used Cars&lt;/h1&gt; &lt;/div&gt;&lt;!-- header --&gt; &lt;div data-role="content"&gt; &lt;ul data-role="listview" data-inset="true" data-theme="a" data-dividertheme="a"&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Chevrolet" data-transition="slide"&gt;Chevrolet&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Chrysler" data-transition="slide"&gt;Chrysler&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Dodge" data-transition="slide"&gt;Dodge&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Ford" data-transition="slide"&gt;Ford&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=GMC" data-transition="slide"&gt;GMC&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Honda" data-transition="slide"&gt;Honda&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Hyundai" data-transition="slide"&gt;Hyundai&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Infiniti" data-transition="slide"&gt;Infiniti&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Jeep" data-transition="slide"&gt;Jeep&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Lincoln" data-transition="slide"&gt;Lincoln&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Nissan" data-transition="slide"&gt;Nissan&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Toyota" data-transition="slide"&gt;Toyota&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="ucd.php?ucd=make&amp;make=Volkswagen" data-transition="slide"&gt;Volkswagen&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!-- content --&gt; &lt;div data-role="footer" data-theme="a"&gt; &lt;h4&gt;Thanks!&lt;/h4&gt; &lt;/div&gt;&lt;!-- footer --&gt; </code></pre> <p></p> <p>Thanks in advance for any help, Josh Hogan</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