title: Unable to connect to xmpp server in phonegap with openfire server using strophe.js
body: <p>I am new to the phonegap.Iam using coredova latest version 2.9.0 for developing chatting application by connecting to xmpp server with open fire server..I have been searching for the related storph.js code in phonegap since last 2 days.I didn't get the running code in phonegap,getting status '1' means connecting..can anyone helps...thanks in advace.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;
  phonegap xmpp tutorial
  &lt;/title&gt;
  &lt;/head&gt;
  &lt;script type="text/javascript" charset="utf-8" src="coredova-2.9.0.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript" charset="utf-8" src="strophe.js"&gt;&lt;/script&gt;
  &lt;script src='http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js'&gt;&lt;/script&gt;
  
  
  
  &lt;script&gt;
  function connect() {
      var username="xxx";
      var HOST_DOMAIN="xxx";
      var password="xxx";
      var BOSH_SERVICE = "xxxxx";
  
      connection = new Strophe.Connection(BOSH_SERVICE);
      connection.connect(username + "@" + HOST_DOMAIN, password, onConnect);
  
  }
  function onConnect(status) {
      alert(status);
          if (status == Strophe.Status.CONNECTED) {
  
              alert("connected");  
  
  
          }else if (status == Strophe.Status.DISCONNECTED) {
              console.log("Strophe is disconnected.");
          }
      }
  
  &lt;/script&gt;
  
  &lt;body&gt;
  &lt;button onclick="connect();"&gt;click&lt;/button&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>