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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
NinjaCoder
Posts: 27
Registered: ‎07-24-2009

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:

http://mikemas.beerisawesome.com/FetchScript.html

 

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

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,693
Registered: ‎10-16-2008
My Carrier: Rogers

Re: Script Element - Onload/OnAbort/OnError

[ Edited ]

According to the HTML reference guide for 5.0:

http://docs.blackberry.com/en/developers/deliverables/11847/BlackBerry_Browser-HTML_Reference--62454...

 

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
Please use plain text.