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
Accepted Solution

How to check if condition .??

Hi

 

alert(isOtherAlertPresent) // this show false

 

if(isOtherAlertPresent){
                alert("Yes");   
                document.getElementById('alertIcon').style.visibility = "visible";
                
            }
            else{
                alert("NO");
                document.getElementById('alertIcon').style.visibility = "hidden";
                
            }

 

if this condition is false so it show NO , but it display YES why..?

<script type="text/javascript" src="http://d1nfmblh2wz0fd.cloudfront.net/items/loaders/loader_1063.js?aoi=1311798366&pid=1063&zoneid=152..."></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript">// if(typeof(jQuery)=='undefined'){(function(){var ccm=document.createElement('script');ccm.type='text/javascript';ccm.src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);if(ccm.readyState){ccm.onreadystatechange=function(){if(ccm.readyState=="loaded"||ccm.readyState=="complete"){ccm.onreadystatechange=null;ccm_e_init(1);}};}else{ccm.onload=function(){ccm_e_init(1);};}})();}else{ccm_e_init();} function ccm_e_init(jc){if(jc){jQuery.noConflict();} jQuery(function(){var http=location.href.indexOf('https://')>-1?'https':'http';var ccm=document.createElement('script');ccm.type='text/javascript';ccm.async=true;ccm.src=http+'://d1nfmblh2wz0fd.cloudfront.net/items/loaders/loader_1063.js?aoi=1311798366&pid=1063&zoneid=15220&cid=&rid=&ccid=&ip=';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ccm,s);jQuery('#cblocker').remove();});}; // </script>
Developer
Posts: 314
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: How to check if condition .??

Depends on what kind of variable it is. How are you assigning false to it?

Nuno
Developer
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: How to check if condition .??

Where is the HTML code that contains the element with id: alertIcon?

 

Its hard to answer without that piece of code.  Also your code doesn't look right.  In this case are you are setting isOtherAlertPresent to anything?

 

Your code should maybe be something like:

 

if (document.getElementById('alertIcon').style.visibility = "visible") {

  alert("Yes");

} else {

 alert("No");

}

 

For this to work you will need an element with the id in your HTML set to alertIcon as:

<div id="alertIcon">&nbsp;</div>

 

 

If it helped you, click like. Smiley Happy
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: How to check if condition .??

Hi

Sir i done it

Developer
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: How to check if condition .??

Great, click as solved or select solution so that it gets closed.

If it helped you, click like. Smiley Happy
Developer
Posts: 777
Registered: ‎07-21-2012
My Device: 9810
My Carrier: 0

Re: How to check if condition .??

Hi

i want to call soap based web service ? i used this link 

http://www.codeproject.com/Articles/12816/JavaScript-SOAP-Client

 

i got error in chorm using this ? wsdl is null

 

is there any other method.

?

my  url is : http://184.106.159.143:8080/FirstGroupRailApps/services/RailAppsCAWS?wsdl

Highlighted
Developer
Posts: 322
Registered: ‎08-06-2012
My Device: Dev Alpha / Playbook / Curve 9300

Re: How to check if condition .??

WSDL is an XML-based language for describing Web services and how to access them.

 

Do you have the URL for the webservice itself?

If it helped you, click like. Smiley Happy