View Single Post
Old 03-18-2009, 04:49 AM   #8 (permalink)
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

By the way, first I tried the following version below and it worked on the BOLD, but not on the new Curve with 4.6.1. Again a bug for me. There were and are a lot of bugs in RIM'S web/javascript engine. I remember the case on the old Pearl with 4.2.1 when all checkbox values in my form were ignored on POST and it took me days to find out that it was a bug of the browser and not my (complex) ASP code. It was then fixed in the next device software release...

Code:
<html>
<head>
<title>
check/uncheck all
</title>

</head>
<body>

<SCRIPT LANGUAGE="JavaScript">
    var allChecked = false;

    function chkAllFunc(list)
    {
	allChecked = !allChecked;

       for(i=0; i<list.length; i++)
       {
           var alertText = "called";                
           list[i].checked=allChecked; 
       }
       //alert(alertText)
   }
</script>



<form name="frmStatus">
<input type="checkbox" name="list" value="1">1<br>
<input type="checkbox" name="list" value="2">2<br>
<input type="checkbox" name="list" value="3">3<br>
<input type="checkbox" name="list" value="4">4<br>
<input type="checkbox" name="list" value="5">5<br>
<br>
<input type="checkbox" name="chkSelectAll" value="Check All"
onClick="chkAllFunc(this.form.list);"> All
<br>
</form>
</body>
</html>
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline   Reply With Quote