Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > BOOK: Professional BlackBerry
|
BOOK: Professional BlackBerry
This is the forum to discuss the Wrox book Professional BlackBerry by Craig J. Johnston, Richard Evers; ISBN: 9780764589539
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional BlackBerry section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 16th, 2007, 09:05 PM
Registered User
 
Join Date: Jul 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Javascript not working on Blackberry

This logic is working perfectly on my IE browser, but not on my Blackberry:

function Update_Scores()
{
    var current_number = document.getElementById("Current_Number").innerHTM L;
    var front_9 = parseFloat(current_number.substring(5));
    var back_9 = parseFloat(front_9) + 1;

    try
    {
       var score_1 = document.getElementById("Score_1").value;
       if (score_1 != null)
       {
         if (front_9 < 10)
         {
           front_9 += '';
           var player1 = "SC_Player_1_" + front_9 + "_3";
           document.getElementById(player1).innerHTML = score_1;
         }
         else
         {
           back_9 += '';
           document.getElementById("SC_Player_1_" + back_9 + "_3").innerHTML = score_1;
         }
       }
    }
    catch (err)
    {score_1 = null}

    try
    {
       var score_2 = document.getElementById("Score_2").value;
       if (score_2 != null)
       {
         if (front_9 < 10)
         {
           front_9 += '';
           var player2 = "SC_Player_2_" + front_9 + "_4";
           document.getElementById(player2).innerHTML = score_2;
         }
         else
         {
           back_9 += '';
           document.getElementById("SC_Player_2_" + back_9 + "_4").innerHTML = score_2;
         }
       }
    }
    catch (err)
    {score_2 = null}

    try
    {
       var score_3 = document.getElementById("Score_3").value;
       if (score_3 != null)
       {
         if (front_9 < 10)
         {
           front_9 += '';
           var player3 = "SC_Player_3_" + front_9 + "_5";
           document.getElementById(player3).innerHTML = score_3;
         }
         else
         {
           back_9 += '';
           document.getElementById("SC_Player_3_" + back_9 + "_5").innerHTML = score_3;
         }
       }
    }
    catch (err)
    {score_3 = null}

    try
    {
       var score_4 = document.getElementById("Score_4").value;
       if (score_4 != null)
       {
         if (front_9 < 10)
         {
           front_9 += '';
           var player4 = "SC_Player_4_" + front_9 + "_6";
           document.getElementById(player4).innerHTML = score_4;
         }
         else
         {
           back_9 += '';
           document.getElementById("SC_Player_4_" + back_9_string + "_6").innerHTML = score_4;
         }
       }
    }
    catch (err)
    {score_4 = null}
}

Mark Gialo
 
Old August 27th, 2008, 02:17 PM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Blackberry browser, unique among browsers, does not support the non-W3C standard innerHTML attribute.

Good luck...

Matt






Similar Threads
Thread Thread Starter Forum Replies Last Post
Working JavaScript Regex vinaura Javascript How-To 0 August 16th, 2007 01:06 PM
Javascript Not working sohrabus ASP.NET 2.0 Professional 4 May 5th, 2007 12:42 PM
working with DLL event, method in JavaScript hendyhanusin Javascript How-To 0 March 23rd, 2007 05:12 AM
Working with Forms and Date in Javascript danieljava Pro JSP 1 January 16th, 2006 05:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.