conditional Comparision like if (flg==true) a=

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mukeshJangid100
    New Member
    • Sep 2012
    • 1

    conditional Comparision like if (flg==true) a=

    a java script code in condition works properly in IE but not works in Mozilla browser.
    my certain portion of code will execute after complete the statement in Mozilla while no in IE.

    plz ,give any solution
  • ariful alam
    New Member
    • Jan 2011
    • 185

    #2
    You should show your code that written by you. That will help experts to test the code and help you.

    :)

    Comment

    • jdstankosky
      New Member
      • Sep 2012
      • 30

      #3
      Not sure what code you're talking about, but perhaps this will help:

      Code:
      if (flg == true) {
      	a = "Whatever you're trying to do";
      }
      if (flg == false) {
      	a = "The other thing you're trying to do";
      }
      
      // You could also do the following:
      
      switch (flg) {
      	case true:
      		a = "Whatever you're trying to do";
      		break;
      	case false:
      		a = "The other thing you're trying to do";
      		break;
      	default:
      		// If neither case is true, do this...
      }

      Comment

      Working...