1. mkleiman's Avatar
    I think I've found a bad bug in the javascript handling by the newer OS builds. In short, no code inside a <script> tag will be executed. Script execution is a core functionality of the Blackberry Browser.

    Here's proof -- Visit the following page from your 0.90-0.99 Blackberry Browser: http://stormhome.freehostia.com/bugtest.html. Visit the same page from your computer browser and see the difference.

    On any browser that does support basic javascript, including Storm OS versions up to 0.86, this will generate a page reading as follows:

    This browser is NOT broken

    However, on the newest Storm beta OS versions (0.90 through 0.99) this results in the following page:

    This browser is broken

    This is true no matter what your javascript settings and no matter what your other browser settings.
    Last edited by mkleiman; 02-06-09 at 12:26 PM.
    02-04-09 01:04 PM
  2. Bundy#AC's Avatar
    I can confirm that your test page only shows the first line. Could it be that you don't have a script type declared (i.e. javascript)?
    02-04-09 01:10 PM
  3. freshgeardude's Avatar
    wow, nice find. it may be the cause as to why the browsers have been reported to have been cutting off pieces of pages
    02-04-09 01:12 PM
  4. mkleiman's Avatar
    I can confirm that your test page only shows the first line. Could it be that you don't have a script type declared (i.e. javascript)?
    Good thought, but I've confirmed this problem exists even with fully articulated script tags (e.g., <script language="JavaScript" type="text/javascript">).
    02-04-09 01:17 PM
  5. Bundy#AC's Avatar
    Strange. Can you think of a reason this was done (security) or is actually just a bug?
    02-04-09 01:41 PM
  6. mkleiman's Avatar
    Strange. Can you think of a reason this was done (security) or is actually just a bug?
    Javascript has its own security protocols built in, and I can confirm that they already worked as intended under earlier OS builds. This has to be a bug, and a serious one at that. Also remember that breaking javascript also breaks AJAX.

    This bug kills everything that made the Blackberry Browser on par with other modern mobile browsers. As of now, its no better than a dumbphone wap browser.
    02-04-09 01:52 PM
  7. rmwolf's Avatar
    I can confirm that .100 for 9500 is NOT affected by this bug.
    02-04-09 02:27 PM
  8. mkleiman's Avatar
    Note: the test page has been edited to make it more clear whether the browser is working or broken.

    Test page: http://stormhome.freehostia.com/bugtest.html
    02-06-09 11:22 AM
  9. 1magine's Avatar
    If AJAX is not working as it should, would that mean that multiple backround tasks within the core ap attempting to act at the same time would cause a javascript error? Or eventually crash the OS?

    Is this at all related to the freeze when setting network to Home?
    02-06-09 11:33 AM
  10. dandrewk's Avatar
    Go to homedepot.com on the browser.

    If yours is like mine, it will return a blank page.
    02-06-09 11:41 AM
  11. jlank's Avatar
    I can see the home depot page just fine.

    Posted from my CrackBerry at wapforums.crackberry.com
    02-06-09 11:46 AM
  12. dandrewk's Avatar
    I can see the home depot page just fine.

    Posted from my CrackBerry at wapforums.crackberry.com
    What OS? I am on .99, but couldn't get homedepot on .90 either.

    I'm using the BB Browser. I can see homedepot fine on Bolt and Opera.
    02-06-09 11:47 AM
  13. cbRoss's Avatar
    I'm on .99 and it loads for me
    02-06-09 11:50 AM
  14. dandrewk's Avatar
    Ok, I got homedepot to load, but only after forwarding the actual home page from my PC to BB.

    For whatever reason, this didn't automatically occur on the BB browser.
    02-06-09 12:00 PM
  15. mkleiman's Avatar
    Go to homedepot.com on the browser.

    If yours is like mine, it will return a blank page.
    Excellent example. Here's the code of the homedepot.com page:

    [php]<HTML>
    <HEAD>
    <SCRIPT language=javascript>
    var hostName = "www.homedepot.com";
    var httpPort = window.location.port;
    if (httpPort && httpPort != "" && httpPort !=80) hostName += ":" + httpPort;
    var u = "http://"+hostName+"/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1"
    if(document.referrer != ""){
    u += "&orig_ref=" + encodeURIComponent(document.referrer);
    }
    window.location.replace(u);
    </SCRIPT>
    <NOSCRIPT>
    <META HTTP-EQUIV = "refresh" content = "0; url=/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1">
    </NOSCRIPT>
    </HEAD>
    </HTML>[/php]

    Its a javascript script that sends you to the "real" home page depending on your URL referrer. On 0.99 the <script> does not work, so you get a blank page.

    If homedepot.com works for you in 0.99 it is because you have javascript turned OFF in your browser preferences. In this case, the browser is simply using the <noscript> tag and you get sent to a real page. Turn javascript ON and re-enter homedepot.com in the address bar -- you will get a blank page.
    Last edited by mkleiman; 02-06-09 at 12:10 PM.
    02-06-09 12:05 PM
  16. cray1000's Avatar
    Excellent example. Here's the code of the homedepot.com page:

    [php]<HTML>
    <HEAD>
    <SCRIPT language=javascript>
    var hostName = "www.homedepot.com";
    var httpPort = window.location.port;
    if (httpPort && httpPort != "" && httpPort !=80) hostName += ":" + httpPort;
    var u = "http://"+hostName+"/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1"
    if(document.referrer != ""){
    u += "&orig_ref=" + encodeURIComponent(document.referrer);
    }
    window.location.replace(u);
    </SCRIPT>
    <NOSCRIPT>
    <META HTTP-EQUIV = "refresh" content = "0; url=/webapp/wcs/stores/servlet/HomePageView?storeId=10051&catalogId=10053&langId=-1">
    </NOSCRIPT>
    </HEAD>
    </HTML>[/php]

    Its a javascript script that sends you to the "real" home page depending on your URL referrer. On 0.99 the <script> does not work, so you get a blank page.

    If homedepot.com works for you in 0.99 it is because you have javascript turned OFF in your browser preferences. In this case, the browser is simply using the <noscript> tag and you get sent to a real page. Turn javascript ON and re-enter homedepot.com in the address bar -- you will get a blank page.

    i got to be honest, i keep javascript off anyways because it slows the browser to a hault to use it and makes pages take into the minutes to load.

    with this bug or without it, i think this browser is far from a usable javascript/ajax browser.
    02-06-09 03:04 PM
  17. mkleiman's Avatar
    i got to be honest, i keep javascript off anyways because it slows the browser to a hault to use it and makes pages take into the minutes to load.

    with this bug or without it, i think this browser is far from a usable javascript/ajax browser.
    While I agree that javascript processing time could be better with the Storm, its a bit extreme to call it "unusable." Code that is written with the browser's capabilities in mind will execute swiftly and flawlessly. My own Custom Home Page is just one example. It uses extensive javascript and AJAX ... and loads in seconds.

    In any event, while I accept that you don't care about this bug, that's not really the point of the thread. There are many people who do care about having functional javascript, and I suspect, a great many more who would care if they understand the significance of the bug.

    The homedepot.com example really brings it home...on any other browser in the world, you'd get to the content one way or another. But with beta OS 0.90-0.99 and its broken javascript you get a blank page. That's simply not acceptable.
    02-06-09 03:14 PM
  18. cray1000's Avatar
    While I agree that javascript processing time could be better with the Storm, its a bit extreme to call it "unusable." Code that is written with the browser's capabilities in mind will execute swiftly and flawlessly. My own Custom Home Page is just one example. It uses extensive javascript and AJAX ... and loads in seconds.

    In any event, while I accept that you don't care about this bug, that's not really the point of the thread. There are many people who do care about having functional javascript, and I suspect, a great many more who would care if they understand the significance of the bug.

    The homedepot.com example really brings it home...on any other browser in the world, you'd get to the content one way or another. But with beta OS 0.90-0.99 and its broken javascript you get a blank page. That's simply not acceptable.
    its not that i dont care, its just that i wish the javascript was more usable in general.

    i have seen many reviews (i think some even during round robin) where the 4.6/4.7 browser was compared to other browsers with javascript and on a off. i remember a couple tests where it was something like

    with javascript off

    bb 48 seconds
    iphone 35 second

    and with javascript on

    bb 2 min 30 seconds
    iphone 55 seconds

    those are from my memory, but as you can see its pretty bad.
    02-06-09 06:13 PM
  19. mkleiman's Avatar
    its not that i dont care, its just that i wish the javascript was more usable in general.
    Well, unless RIM fixes this bug you won't have to worry: they've taken the option of using javascript out of your hands entirely by disabling it at the OS level.

    Perhaps this is a secret plot by RIM to improve the browser benchmarking.
    02-06-09 06:35 PM
  20. bigredrandy's Avatar
    Sure enough - blank screen on HD...


    Nice catch! Hope RIM gets finds/fixes this one...
    02-06-09 08:57 PM
  21. slope420jo's Avatar
    mine was giving me some java error too with .99
    02-07-09 02:15 AM
  22. mkleiman's Avatar
    mine was giving me some java error too with .99
    Java and javascript are completely different things. If you had a java error under 0.99 then it has nothing to do with the javascript bug I described in this thread.
    02-07-09 09:44 AM
  23. ls1_se7en's Avatar
    Mine displayed "this borwser is not broken" on .99. and now on my hybrid .90/.99.
    02-07-09 11:03 AM
  24. mkleiman's Avatar
    Mine displayed "this borwser is not broken" on .99. and now on my hybrid .90/.99.
    Not that I doubt your post, but you are the only person on this site and on HoFo to report that javascript scripts are working in 0.90 or 0.99.
    02-07-09 12:55 PM
  25. ls1_se7en's Avatar
    Not that I doubt your post, but you are the only person on this site and on HoFo to report that javascript scripts are working in 0.90 or 0.99.
    Never mind...that was using opera. lol. The storm browser reports "broken".
    02-07-09 01:02 PM
26 12
LINK TO POST COPIED TO CLIPBOARD