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

Posts: 27
Registered: ‎07-24-2009
My Device: Not Specified

Script Element - Onload/OnAbort/OnError

I am trying to attach an onload, onerror, and onabort event listener to a script element:


Here is all the code I tried:



Not possible?


Yes I know there are many other ways to know when a script tag is done downloading such as a call back (JSONP) or polling for a namespace or use xmlhttprequests.

However the scripts are sometimes cached and sometimes not cached and sometimes they are on different domains and I maintain a library that doesn't know about that.


Another way to get the onload event I can imagine would be to make a JS proxy so I can always to an XMLHttpRequest but I really dont want to be in the business of making proxies.

Blackberry 5.0 Browser

Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Script Element - Onload/OnAbort/OnError

[ Edited ]

According to the HTML reference guide for 5.0:



onload is only for <body> and <frameset>


onerror and onabort are not supported



Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter