BlackBerry Torch 9800 Web Browser Issues with Javascript Events

I seem to have a huge problem with the BlackBerry Torch 9800 web browser browser. This browser supports HTML5 and javascript. The appearance of a web page designed for a mobile device in HTML 5 looks the same for iPhone, Android, and the torch. But the functionality is wise, the torch really sucks when it comes to javascript events, which are cross-lights for some reason. All other mobile browsers and desktop browsers that support HTML5 work without problems. At first I thought it was the jQuery javascript structure I used. So, I switched to a much more complex version with XUI, and I still get the crossfire of the same name. Here's what I mean (using jQuery 1.4.x or jQuery 1.5 or XUI 2.0): (The following are both jQuery 1.5 (for documents) and XUI objects and event models)

<!DOCTYPE html>
<html>
<head runat="server">
  <meta charset="utf-8">
  <meta name="HandheldFriendly" content="true" />
  <meta name="apple-mobile-web-app-capable" content="yes"/>
  <meta name="viewport" content="user-scalable=no, width=device-width" />
...

  <script type="text/javascript" src="../Scripts/jquery-1.5.min.js"></script>
  <script type="text/javascript" src="../Scripts/xui-bb-2.0.0.min.js"></script>
</head>
<body>
<form ... >
  <div style="width: 100%;">
    <label>Dropdown List 1</label><br />
    <select id="m_ddl1" style="width: 100%;">
      <option value="1">Option 1</option>
      <option value="2">Option 2</option>
      <option value="3">Option 3</option>
      <option value="4">Option 4</option>
    </select>
  </div>
  <br />
  <div style="width: 100%;">
    <label>Dropdown List 2</label><br />
    <select id="m_ddl2" style="width: 100%;">
      <option value="a">Option A</option>
      <option value="b">Option B</option>
      <option value="c">Option C</option>
      <option value="d">Option D</option>
    </select>
  </div>
  <br />
  <asp:LinkButton runat="server" id="m_goButton" CssClass="button disabled" Enabled="false" ClientIDMode="Static">Go</asp:LinkButton>

<script type="text/javascript">
$(document).ready(function()
{   var pageRun = new PageFunctionality();
    pageRun.Initialize();
});

function PageFunctionality()
{   this.Option1 = x$("#m_ddl1");
    this.Option2 = x$("#m_ddl2");
    this.Button = x$("#m_goButton");
    this.Link = x$("#m_link");
}

PageFunctionality.prototype.Initialize = function()
{   var me = this;
    me.Option2.attr("disabled", "disabled");        

    me.Option1.on("change", function()
    {  me.EnableButton(me.Button, false);
       me.Option2.attr("disabled", "");
       alert("DD1 Changed");
    });

    me.Option2.on("change", function()
    {  me.EnableButton(me.Button, true);
       alert("DD2 Tapped");
    });
}

PageFunctionality.prototype.EnableButton = function(objButton, isEnable)
{   var me = this;

    if(isEnable)
    {  x$(objButton)
        .on("click", function()
        {  me.Option2.attr("disabled", "disabled");
            me.EnableButton(me.Button, false);
            alert("Button Tapped");
        })
         .removeClass("disabled");
    }
    else
    {  x$(objButton)
        .un("click")
         .addClass("disabled");
    }
}
</script>
</form>
</body>
</html>

BlackBerry Torch, , 1 onchange . . , BlackBerry , , , .

jQuery Mobile 1.0 alpha 2 framework. javascript dropdown BlackBerry, . , jQuery XUI BlackBerry. , - .

+3
2

, , XUI, jquery-mobile. , , firebug/browser BB OS. webkit, , BB6, , BB5, , , JS- jquery-mobile, Ajax Navigation.

0

BB os6 XUI , . BB OS6 .

0

Source: https://habr.com/ru/post/1789868/


All Articles