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

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
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha

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
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Contributor
GigaDon
Posts: 13
Registered: ‎11-13-2012
My Device: BlackBerry PlayBook 1, Curve 2, Bold 5 and Storm 2

Re: BBUI.js and JQUERY

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

Developer
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha

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
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


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

Re: BBUI.js and JQUERY

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

Developer
JRab
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
GigaDon
Posts: 13
Registered: ‎11-13-2012
My Device: BlackBerry PlayBook 1, Curve 2, Bold 5 and Storm 2

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
JRab
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 :smileyhappy:

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

Re: BBUI.js and JQUERY

Thanks for the 411!!