title: "IF ELSE" Javascript not working
body: <p>A) I have a first function which works very well :</p>
  
  <pre><code>  if(onlyUs == '1' &amp;&amp; idUser == '0'){
              obj.after(jQuery('&lt;div /&gt;').css({'clear':'both'}).addClass('kklike-msg').text('Only registered users can vote.'));
              setTimeout(function(){
                  jQuery('.kklike-msg').fadeOut('normal');
              },3000);
              return false;
          }
  </code></pre>
  
  <p>B) So I thought I could do the following thing :</p>
  
  <pre><code>        if(idUser == '0'){
                  if(action == 'like'){
                          var ajaxAction = 'add_like';
                  }else{
                          var ajaxAction = 'remove_like';
                  }
          }else{
              if(action == 'like'){
                          var ajaxAction = 'add_like';
                          window.open('http://mywebsite.com/like')
                  }else{
                          var ajaxAction = 'remove_like';
                          window.open('http://mywebsite.com/remove')
                  }
          }
  </code></pre>
  
  <p>C) Knowing that the original function is simply (works well):</p>
  
  <pre><code>if(action == 'like'){
                          var ajaxAction = 'add_like';
                  }else{
                          var ajaxAction = 'remove_like';
                  }
  </code></pre>
  
  <p><strong>But B) is not working.</strong> In both condition (Login or not), the new window is going to open.
  Do you have a solution ?</p>