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.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: Get click event of row

Hi
one more issue i want to discuss
How to remove caching in android.?
actually android use chrome so it have functionality of caching , i want to remove caching
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: Get click event of row

Done It

New Developer
Posts: 108
Registered: ‎01-23-2012
My Device: torch,bold,curve,strom
My Carrier: Blackberry

Re: Get click event of row

Hi,

 Can you post the code which you have implemented!

Thanks & Regards,
Kumar Shivam
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: Get click event of row

what you want..?

New Developer
Posts: 108
Registered: ‎01-23-2012
My Device: torch,bold,curve,strom
My Carrier: Blackberry

Re: Get click event of row

post the code for  remove caching in android.

Thanks & Regards,
Kumar Shivam
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: Get click event of row

caching is not done , get click event of row is done..
are you trying ? if you succeed please let me know..

Thanks
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: Get click event of row

Hi if i want to do another work on click image in a row (do another work on row click )..How to do that.?

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Departure Schedule</title>
<!--<link href="style/style.css" rel="stylesheet" type="text/css" />-->
<link href="scrollbar.css" rel="stylesheet" type="text/css" />
<!--<script type="text/javascript" src="script/common.js"></script>
<script type="text/javascript" src="script/soapclient.js"></script>
<script type="text/javascript" src="script/jquery.min.js"></script>-->
<script type="text/javascript" src="iScroll.js"></script>
<style type="text/css">
.scroll-pane
{
width: 100%;
height: 150px;
z-index:1;
overflow: auto;
position: relative;

}

.scroll-pane table tr:hover
{
background:#dbe3ec;

}

table td {
	text-align: center;
}
</style>



<script type="text/javascript">
var myScroll;

function GetDepartureStationDashboard_callBack()
{
	//document.getElementById('loadingImg').style.visibility = "hidden";
	var tbl = document.getElementById('mainBodyDivContent');
	for (var i = 0; i < 50; i++) {
		var tr = document.createElement('tr');
		tr.setAttribute('id', i);
		(function(id) {
			tr.onclick = function() {
				if(myScroll.isScrolling) {return;}

				alert(id);//************do something on row click***************************************
			};
		}(i));
		
		var td1 = document.createElement('td');
		td1.setAttribute('width', '30%');
		td1.innerHTML = 'column 1.'+i;;
		
		var td2 = document.createElement('td');
		td2.setAttribute('width', '30%');
		td2.innerHTML = 'column 2.'+i;;
		
		var td3 = document.createElement('td');
		td3.setAttribute('width', '35%');
		td3.innerHTML = 'column 3.'+i;;
		
		var td4 = document.createElement('td');
		td4.setAttribute('width', '5%');
		td4.innerHTML = <img src=\"images/error.png\" width=\"24\" height=\"24\" />;//********** i want to do another task on this image click*****************
		
		tr.appendChild(td1);
		tr.appendChild(td2);
		tr.appendChild(td3);
		tr.appendChild(td4);
		
		tbl.appendChild(tr);
	}


	myScroll = new iScroll('mainBodyDiv', {
		snap: 'tr',
		scrollbarClass: 'myScrollbar',
		"onScrollMove": function(e) {
			myScroll.isScrolling = true;
		},
		"onScrollEnd": function(e) {
			window.setTimeout(function() {myScroll.isScrolling = false;}, 120);
		}
	});
}

</script>
</head>
<body onload="GetDepartureStationDashboard_callBack()">
<div id="wrapper">
<div class="login_cont">
<div class="home_icon"><a href="index.html"><img src="images/back-icon.png" alt="Home" title="Home" /></a></div>
<h1 class="fr">Departures</h1>
<div class="cl"></div>
<div class="mid_cont">
<div class="grid_cont">
<div class="heading_bar">
<h1 class="fl" id="headingcontent"></h1>
<input name="" type="button" class="heading_btn fr" value="Change" onclick="location.href='index.html'"/>
<div class="cl"></div>
</div>
<div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td width="30%">PLATFORM NO.</td><td width="30%">STD - ETD</td><td width="35%">NEXT STATION</td><td width="5%">STATUS</td>
	</tr>
</table>
</div>

<div class="scroll-pane" id="mainBodyDiv">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" id="mainBodyDivContent">
		
	</table>
</div>

<div class="grid_error"><img src="images/help-icon.png" /> Departure Schedule</div>
</div>
</div>
</div>
</div>
<input type="hidden" name="hdnStationName" id="hdnStationName" value="" />
</body>
</html>

 

Highlighted
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Get click event of row

The question asked with the headline of this thread was already answered and you shouldn't asked more questions here not referring to the main headline. BTW: to answer the post above have a closer look here: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Do-something-on-image-click-that...


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.