4 Replies - 6342 Views - Last Post: 27 August 2012 - 07:11 PM

#1 jcdb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 23-August 12

JQuery Mobile (PhoneGap) - images [?] not loading

Posted 26 August 2012 - 08:18 PM

I am currently using jQuery Mobile (PhoneGap) - HTML5 + CSS5 + Javascript that supports Xcode. I will explain below.

First scenario:
I use web app to test on my iPad (e.g. http://192.168.1.100/cdg/index.html) and all of the images work on the safari (PC) or safari (iPad).

Second scenario:
I put all of my files into Xcode where it supports PhoneGap. When I click Xcode and run it using iOS Simulator but some of the images does not appear on iOS Simulator - I have attached 3 screenshots image below.

* I don't understand why second scenario does not work but first scenario works. I have checked the codes for images umpteen times but it seems to be correct. I am clueless.

Do you know where the problem lies with?

I need all the images working finely on iOS Simulator before I can deploy it to iTunes store. I know the image format must be in PNG but can it work with JPG? Just wondering.

By the way, I have attached the parent directory. The image may look like Windows because I am not using mac os now but the concept is about the same.

<!-- Events 2012 (Cooking - 12th July 2012) Homepage -->
    <div data-role="page" id="event_2012_3">
    	<div data-role="header" data-theme="b">
        		<a href="#events_2012" data-icon="arrow-l" data-theme="a">Back</a>
            		<h3>Cooking Demonstration (12th May 2012)</h3>
            </div>
            
            <div data-role="fieldcontain" align="center">
        		<label for="search-basic"><b>Search Company or Person Name:</b></label>
					<input type="text" class="loadcooking" value="" name="search" placeholder="Type here">
           	</div>
    	
        <div id="hideall_12may2012">
        	<div id="2012_12July_swipe_event1">
          	<div data-role="content">
           	<img src="Images/CDRSiChuan02_740_600.png">
              <p align="center">
              <img src="Images/btn1_13.png">
          </div>
        </div>
        
        <div id="2012_12July_swipe_event2">
            <div data-role="content">
            	<img src="Images/CDRSiChuan04_740_600.png">
                <p align="center">
                    <img src="Images/btn2_13.png">
            </div>
        </div>
        
        <div id="2012_12July_swipe_event3">
            <div data-role="content">
            	<img src="Images/CDRSiChuan05_740_600.png">
                <p align="center">
                	<img src="Images/btn3_13.png">
            </div>

<div data-role="content" align="center" id="hide12may2012">
       		<img src="Images/CDRSiChuan02_740_600.png" width="50" height="50" id="event2a_thumbnails">
        	<img src="Images/CDRSiChuan04_740_600.png" width="50" height="50" id="event2b_thumbnails">
        	<img src="Images/CDRSiChuan05_740_600.png" width="50" height="50" id="event2c_thumbnails">
        </div>

<p align="right">
        	<a href="#events_2012" data-theme="b" data-role="button" data-inline="true" data-transition="slide" id="back_12may2012">
            Back</a>
            <a href="" data-theme="b" data-role="button" data-inline="true" data-transition="slide" id="refresh_12may2012">
            Refresh</a>
        </p>
    </div>
    <!-- page -->

Attached image(s)

  • Attached Image
  • Attached Image
  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: JQuery Mobile (PhoneGap) - images [?] not loading

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6066
  • View blog
  • Posts: 23,526
  • Joined: 23-August 08

Re: JQuery Mobile (PhoneGap) - images [?] not loading

Posted 27 August 2012 - 06:07 AM

This has NOTHING to do with Objective-C; it's Javascript.

Moved to jQuery subforum of Javascript.
Was This Post Helpful? 0
  • +
  • -

#3 exiles.prx  Icon User is offline

  • D.I.C Head

Reputation: 65
  • View blog
  • Posts: 239
  • Joined: 22-November 10

Re: JQuery Mobile (PhoneGap) - images [?] not loading

Posted 27 August 2012 - 06:31 PM

Have you tried taking a look at your image path(s) to verify that they are correct? When ever the questions mark images appear in mobile, this usually means the image URL is not correct or the image cannot be found.

On a side note: http://192.168.1.100/cdg/index.html is an internal address so it is not accessible unless we are on your local network. Any 192.168.xxx.xxx IP is an internal address.

This post has been edited by exiles.prx: 27 August 2012 - 06:32 PM

Was This Post Helpful? 0
  • +
  • -

#4 jcdb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 23-August 12

Re: JQuery Mobile (PhoneGap) - images [?] not loading

Posted 27 August 2012 - 06:59 PM

View PostJackOfAllTrades, on 27 August 2012 - 06:07 AM, said:

This has NOTHING to do with Objective-C; it's Javascript.

Moved to jQuery subforum of Javascript.


I am sorry about it but thanks for moving my post to JQuery subforum of Javascript.
Was This Post Helpful? 0
  • +
  • -

#5 jcdb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 23-August 12

Re: JQuery Mobile (PhoneGap) - images [?] not loading

Posted 27 August 2012 - 07:11 PM

View Postexiles.prx, on 27 August 2012 - 06:31 PM, said:

Have you tried taking a look at your image path(s) to verify that they are correct? When ever the questions mark images appear in mobile, this usually means the image URL is not correct or the image cannot be found.

On a side note: http://192.168.1.100/cdg/index.html is an internal address so it is not accessible unless we are on your local network. Any 192.168.xxx.xxx IP is an internal address.


Yes, I had taken a look at the image path(s) already because I insert the images using Macromedia Dreamweaver (Windows 7) and the images appear which means the path is correct. I also tested it using localhost on PC and all of the images appear. I also tested it using IP address on my iPad and all of the images appear. --> It is OK but the server is loading very slow.

When I throw my app folder into "www" folder on Mac OS X because I want to run this app using iOS Simulator and then some of the images does not work BUT some of the images work. I am puzzled and confused. I am using XCode software and there is no functionality that allows me to view the images if they are working or not. I don't have Macromedia Dreamweaver on my Mac OS X.

What should I do to let you check it for me but the problem lies with iOS Simulator (Xcode).
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1