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
Contributor
Posts: 13
Registered: ‎11-13-2012
My Device: BlackBerry PlayBook 1, Curve 2, Bold 5 and Storm 2
My Carrier: Airtel Nigeria

BBUI.js and JQUERY

I hope I get to finish this project before the year runs out!

 

Hi Every one,

Please I am working with bbui.js and jquery(the minified version of 1.5) and everytime I add this block of code to the page:

 

<script type="text/javascript">

    $(document).ready(function() {

         $("#btnClick").click(function() {

            $.ajax({

                 url: 'gosomewhere.html',

                 success: function(data) {

                     $("#Balance").html(data);

                 }

            });

         });

      });

</script>

 

The page becomes blank on load. Please is there a way I can use ajax with bbui.js all I trying to do is pass the value of fields on this page to an external page/site and on success print the returned data in another div on the page.

 

I need your help and I need it real fast!

 

Thanks!

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: BBUI.js and JQUERY

Hi!

Are you running this in Ripple or on a real device?

 

Turn on the web inspector and reload the page, take a look at the console. For sure it will print some error and tell you where the problem is.

 

all the best

Nuno
Highlighted
Contributor
Posts: 13
Registered: ‎11-13-2012
My Device: BlackBerry PlayBook 1, Curve 2, Bold 5 and Storm 2
My Carrier: Airtel Nigeria

Re: BBUI.js and JQUERY

My ripple is not working. I am using it on a Bold 4 emulator.

Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: BBUI.js and JQUERY

you can use webkit inspector remotely but I advise you to get your Ripple working, testing it locally its much easier and faster.

make sure you have the latest version installed.

Nuno
J4y
Contributor
Posts: 27
Registered: ‎01-19-2013
My Device: Z10 Dev Edition, Playbook, every BB in-between
My Carrier:

Re: BBUI.js and JQUERY

bump, any updates if you got this working? Having same issue here. 

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: BBUI.js and JQUERY

Hey GigDon,

 

In my experience, the best way to use JQuery with BBUI is to place any jquery code into the ondomready function of the bb.init method when initializing the applicatin. What does your index.htm file look like?

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Contributor
Posts: 13
Registered: ‎11-13-2012
My Device: BlackBerry PlayBook 1, Curve 2, Bold 5 and Storm 2
My Carrier: Airtel Nigeria

Re: BBUI.js and JQUERY

Hi J4Y,

What does bump mean again, just so I know I am getting the correct vibe from you and to answer your question. No my ripple is still not working @nunodonato.

 

@JRab, I try your solution and see if it work.If it does I'll come back to give you likes.

 

Take Care Y'all!!

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: BBUI.js and JQUERY

Hey GigaDon,

 

Bump just means to "push" the thread back to the top of the thread list in the forums -- he's having simliar issues to yours and wanted to get more attention to this thread Smiley Happy

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Contributor
Posts: 13
Registered: ‎11-13-2012
My Device: BlackBerry PlayBook 1, Curve 2, Bold 5 and Storm 2
My Carrier: Airtel Nigeria

Re: BBUI.js and JQUERY

Thanks for the 411!!