The #1 Nexus 7 News, Discussion and Fan Site!

2012 Nexus 7 Discussion Forums (1st Generation) => Nexus 7 Root, Hacks, Mods And Development => Topic started by: caprock on September 15, 2012, 05:38:15 PM

Title: N7 chrome browser does not display JQM html pages properly
Post by: caprock on September 15, 2012, 05:38:15 PM
Nexus 7/16gb/Unlocked/Rooted (Standard (ROM)

I am new to Android and all mobile development as well. Trying to develop a mobile application with latest jQuery Mobile (JQM) with mark-up html pages.
This is a good example:<

Code: [Select]
https://github.com/jtsage/jquery-mobile-simpledialog
Browsing this real web site above with the N7/Chrome, and with the desktop under Chrome and Firefox, all page formatting displays as expected.

The problem is that when I copy these into my N7 folder /storage/sdram0/html these same html files do not display with the formatting grahics when browsed on the N7; the pretty dialog menus are displayed as the basic html links; it is as if the JQM engine is not running.

If I browse these same simpledialog N7 files with the Android PAW Server to my desktop IP, these are displayed fully with both Chrome and Firefox.

When exploring the N7 file structure, the PAW file structure is mainly the same: /storage/sdram0/paw/html/app/...so seems to have the same structure.

I have searched many associated forums, and cannot find a hint as to what is missing. So the question is why? Is this a case of privileges?

It seems as though the the JQM is not loaded. But there doesn't appear to be any missing files since they all use only Web access.

Anyone out there with an answer or hint, would be greatly appreciated!!!!

Code: [Select]

    <link rel="stylesheet" type="text/css" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
    <link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.css" />

    <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
    <script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog2.min.js"></script>
[/size]   
Title: Resolved Re: N7 chrome browser does not display JQM html pages properly
Post by: caprock on September 17, 2012, 08:43:45 AM
Resolved!

I found a post from
Code: [Select]
http://www.codeofaninja.com/2011/05/how-to-view-webpage-inside-your-android.html that provided a so so simple solution. I was browsing from the current tree rather than the complete tree path!

Hope this helps others.


Quote
If you want to view an html page from your sdcard, you can change the url for example "file:///sdcard/YourProject/index.html". Well that's it. Thanks for reading. :)