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: Do something on image click that is insert in row , do another thing on row click

is there any possibility to remove this arrival.html ?
Developer
Developer
Posts: 607
Registered: ‎04-29-2011
My Device: PlayBook 16GB, BB10 LE Z10 (red)
My Carrier: none

Re: Do something on image click that is insert in row , do another thing on row click

Make your own popup with own content and don't use the alerts. For BlackBerry you could also use Dialog API to show dialogs looking like this one:

 

IMG_00000011.jpg

 

Using this you are able to add a title, a content text and button(s) if needed.

 


"Like" if you liked the post.
"Accept as Solution" if the post solves your question.
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: Do something on image click that is insert in row , do another thing on row click

oK sir

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

Re: Do something on image click that is insert in row , do another thing on row click

Hi

Sir i need some help in storage of data. 

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

Re: Do something on image click that is insert in row , do another thing on row click

Hi

 

I want to make custum pop in pone gap in all plateform.For example : in pop up there is three row are display .

 

after clicking the first row it will dislay the description of that alert in (by increasing its length), but when user click 2 alsert it will close the first description and open the second alert description .

 

Is this possible..?

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

Re: Do something on image click that is insert in row , do another thing on row click

hi

var td4 = document.createElement('td');
		var img = document.createElement('img');
		img.setAttribute('width', '24');
        img.setAttribute('height', '24');
		td4.setAttribute('style','width:3%');
		td4.setAttribute('align','center');
		(function(id) {
       img.onclick = function(e) {
      e.preventDefault();
      e.stopPropagation();
      // now it will alert the id (what is the i of the for-loop):
	  console.log(img);
	   console.log(img.attr);
	  if( img.attr('src')== "images/error-icon.png")
      alert(id); /// want to show id only on clicking error image .but it is not shown
      };
     }(i));


	if(serviceAlertPresent[i].firstChild.nodeValue == 'false'||otherAlertPresent[i].firstChild.nodeValue == 'false')
	{   
	     img.src='images/correct-icon.png';
		
	}
	else 
	{
	    img.src='images/error-msg.png';
		
		
	}
		td4.appendChild(img);

 

can you please help me if i want to show alert only on error image how to do that..?