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
New Developer
Posts: 6
Registered: ‎12-29-2008
My Device: Not Specified

bold 9000 and javascript

Hello,

 

I'm trying to use jquery on my bold 9000.

It doesn't work (at all, even the most simple example)!

 

The web site is well displayed on firefox, ie, opera (including ephone version)....

 

Any advice ?

 

thanks in advance

Guru I
Posts: 19,020
Registered: ‎07-29-2008
My Device: Passport, Playbook, 9320BES
My Carrier: Bouygues _ SFR

Re: bold 9000 and javascript

yeah : never trust the Blackberry Browser to do AJAX or dynamic javascript. Maybe on the Storm ?



The search box on top-right of this page is your true friend, and the public Knowledge Base too:
New Developer
Posts: 6
Registered: ‎12-29-2008
My Device: Not Specified

Re: bold 9000 and javascript


Xandrex wrote:
... Maybe on the Storm ?

unfortunatelly, I have no access to the Storm, due to my enterprise provider.

And i still do not found how to use the simulators to simulate an http connexion.

 

thank you

New Developer
Posts: 43
Registered: ‎07-29-2008
My Device: Not Specified

Re: bold 9000 and javascript

1.
Xandrex wrote:
yeah : never trust the Blackberry Browser to do AJAX or dynamic javascript. Maybe on the Storm ?

 

The BlackBerry Browser v4.6 and higher supports Ajax very well.

 

2. I have taken a look at the jQuery library and a browser detection is performed. Therefore: If the BlackBerry browser isn't detected as supported browser the library might not work. jQuery supports only IE, Firefox, Safari and Opera and the library does not work with mobile browsers out of the box.

 

3. You have to use the MDS simulator to connect the Bold simulator to the internet. You can use BlackBerry JDE 4.6. This download contains the BlackBerry device and the MDS simulator.

New Developer
Posts: 6
Registered: ‎12-29-2008
My Device: Not Specified

Re: bold 9000 and javascript

thank you very much

 

I will try to 'hack' jQuery to have it work with blacberry as if it was ie.

 

thank you again

Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: bold 9000 and javascript

[ Edited ]
It would be better to hack it to work as if it were firefox or safari. IE's behavior is very non-standards-compliant and very different from other browsers. The 4.6+ browser on the blackberry is much closer in behavior to firefox/safari.
Message Edited by staktrace on 2008-12-30 11:55 AM
New Developer
Posts: 6
Registered: ‎12-29-2008
My Device: Not Specified

Re: bold 9000 and javascript


staktrace wrote:
It would be better to hack it to work as if it were firefox or safari. ...

You'e right.

The hack seems ok but not in the minimized version Smiley Sad.

At this time I must use the developement version (with all comments and crlf) that is 98Ko instead of 55Ko.

I will check where the minimizer disturb the bb browser.

New Developer
Posts: 43
Registered: ‎07-29-2008
My Device: Not Specified

Re: bold 9000 and javascript

There is also a Beta of jQuery 1.3. This new version no more uses the browser detection. Ajax calls work on BlackBerry devices.

 

 

Developer
Posts: 107
Registered: ‎09-25-2008
My Device: Not Specified

Re: bold 9000 and javascript


tschmit wrote:

The hack seems ok but not in the minimized version Smiley Sad.

At this time I must use the developement version (with all comments and crlf) that is 98Ko instead of 55Ko.

I will check where the minimizer disturb the bb browser.




Most likely the code to unpack jquery is taking too long and causing the script to be killed. Turn off the "Terminate slow running scripts" option in the browser and see if that makes a difference.
New Developer
Posts: 6
Registered: ‎12-29-2008
My Device: Not Specified

Re: bold 9000 and javascript

I turn off the "Terminate slow running scripts" option in the browser and that makes no difference. 

 

But, actually the code is not packed but minimized. In my mind this means that all the "human needed" characters are removed from the script. But I may be wrong.

 

I was thinking to too long lines... or anything else