Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Retired
Posts: 3
Registered: ‎01-06-2011
My Device: Not Specified

Re: jquery mobile alpha and blackberry widgets

I was having the same problem with my fonts etc not showing up and once I whitelisted JQuery all it working fine. Wish I would have seen this posting earlier Smiley Wink

New Contributor
Posts: 3
Registered: ‎02-10-2011
My Device: Not Specified

Re: jquery mobile alpha and blackberry widgets

[ Edited ]

Hi everybody,

 

i just don't get it running.

I tried to create a simple widget, using the jquery mobile alpha 3 ui.

I wanna create an offline widget, so i put the jquery files in the project folder and refered in the header to the according scripts.

 

like this:

 

...
  <head>
  <title>Page Title</title>
  <link rel="stylesheet" href="jquerymobile10a1min.css" />
  <script src="jquery143min.js"></script>
  <script src="jquerymobile10a3.min.js"></script>
</head>

<body>
<div data-role="page">
  <div data-role="header">
    <h1>This is the header</h1>
  </div>
  <div data-role="content">
    <p>this is the content area.</p>    
  </div>
  <div data-role="footer">
    <h4>..and the footer</h4>
  </div>
</div>
</body>
</html>

 

 

 The build was successfull (after i had renamed the "-"s).

Now i have the following issue:

When i start the app in the simulator, i get a white screen, showing nothing.

When i rename the css file (so that the app doesn't find it) a normal non formated HTML is shown.

 

 

Do you have any hints or ideas, what i am doing wrong? I am quite new to the BB Widget Development,so i would be very happy if anybody could help me.


Thanks a lot,

Markus




 

 

Retired
Posts: 3
Registered: ‎01-06-2011
My Device: Not Specified

Re: jquery mobile alpha and blackberry widgets

This works for me but I will try it local as using it offline is a good idea but see if it works remotely first. I had the same problem with fonts etc not showing up until I whitelisted it.

remote call code sample

 

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" /><script src="http://code.jquery.com/jquery-1.4.4.min.js"></script><script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
<script type="text/javascript">

Be sure to whitelist in your config xml (see below)

 <access subdomains="true" uri="http://code.jquery.com"/>

New Contributor
Posts: 3
Registered: ‎02-10-2011
My Device: Not Specified

Re: jquery mobile alpha and blackberry widgets

Hi,

thank you very much for your help. I have already tried to use the online ressources and whitelist the domains. The problem is, that i am in the enterprise network of my comany and my simluator cannot access any external servers. I think that is the reason, why i get a white screen, linking to the online resources. And that is the reason, why i try to get it offline/local running. :-)

 

Please keep me updated, if you have any new information or if you have success with the local approach.

New Contributor
Posts: 3
Registered: ‎02-10-2011
My Device: Not Specified

Re: jquery mobile alpha and blackberry widgets

Update: I got it running.

 

I don't know exactly what the problem was, but now it works for me, referencing to local ressources.

 

Se the following demo code:

 

<html> 
  <head> 
  <title>Page Title</title> 
	<link rel="stylesheet" href="js/jquery_mobile.css" />
	<script type="text/javascript" src="js/jquery15.js"></script>
	<script type="text/javascript" src="js/jquery_mobile.js"></script>
</head> 
<body> 
<div data-role="page" data-theme="b">
        <div data-role="header" data-theme="b">
            <h1>My Site</h1>
        </div>
        <div data-role="content">
            <ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="a">
                <li data-role="list-divider">Transition Effects</li>
                <li><a href="effects.php?id=slide" data-transition="slide">Slide</a></li>
                <li><a href="effects.php?id=slideup" data-transition="slideup">Slide Up</a></li>
                <li><a href="effects.php?id=slidedown" data-transition="slidedown">Slide Down</a></li>
.
.
.

 

 

New Contributor
Posts: 4
Registered: ‎10-23-2010
My Device: Not Specified

Re: jquery mobile alpha and blackberry widgets

Am using WebWorks Plugin 2.5.1 and 9800 torch simulator but i could not debug the application. It was saying debugging Not Supported in 6.0.0 Simulators