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 Contributor
tludewig
Posts: 2
Registered: ‎04-22-2011
My Device: 9700
Accepted Solution

onload occurs twice in Blackberry 9800 browser?

[ Edited ]

I have been testing my WebWorks SDK 2.0 app with BB 9700, and I use the following JQuery code:

 

jQuery(document).ready(function($) {

    // Do important stuff once only onload.

});

 

 

This code works fine for the 9700. It is called once and I do the necessary stuff once.  However, I am now testing the same app with a BB 9800 Torch and this code is getting called twice. :smileysad:  Has anyone seen this behavior?  Do you have a solution for this?  Is this a known bug?

 

The code is only running once in IE7 and Firefox.

 

Thanks very much.

New Contributor
tludewig
Posts: 2
Registered: ‎04-22-2011
My Device: 9700

Re: onload occurs twice in Blackberry 9800 browser?

Fixed!

 

I am not sure why, but before when the problem was occurring, I was using an ugly way of doing a few of my links in my index.html, i.e.

 

<a href="#" onclick="Javascript&colon;doSomething()">Click Me</a>

 

And for whatever reason, cleaning these up to look like the following fixed the double-load event.

 

<a href="Javascript&colon;doSomething()">Click Me</a>