[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6065] trunk/UI/login.js



Revision: 6065
          http://sourceforge.net/p/ledger-smb/code/6065
Author:   einhverfr
Date:     2013-09-20 06:59:41 +0000 (Fri, 20 Sep 2013)
Log Message:
-----------
working indeterminate bar works now (had to move xhr to async)

Modified Paths:
--------------
    trunk/UI/login.js

Modified: trunk/UI/login.js
===================================================================
--- trunk/UI/login.js	2013-09-20 05:30:51 UTC (rev 6064)
+++ trunk/UI/login.js	2013-09-20 06:59:41 UTC (rev 6065)
@@ -18,19 +18,24 @@
 	var company = document.login.company.value;
 	var action = document.login.action.value;
         //alert('document.login.company.value='+document.login.company.value);
-	http.open("get", 'login.pl?action=authenticate&company='+company, false, username, password);
-	http.send("");
-        if (http.status != 200){
-                if (http.status == '454'){
-                     alert('Company does not exist.');
-                } else {
-  		     alert("Access Denied:  Bad username/Password");
-                }
-                var e = document.getElementById('login-indicator');
-                e.style.visibility='hidden';
-		return false;
-	}
-	document.location=document.login.action.value+".pl?action=login&company="+document.login.company.value;
+	http.open("get", 'login.pl?action=authenticate&company='+company, true, username, password);
+        http.onreadystatechange = function(){
+            if (http.readyState != 4){
+               return true;
+            }
+            if (http.status != 200){
+                    if (http.status == '454'){
+                          alert('Company does not exist.');
+                    } else {
+  	   	          alert("Access Denied:  Bad username/Password");
+                    }
+                    var e = document.getElementById('login-indicator');
+                    e.style.visibility='hidden';
+	  	    return false;
+	    }
+	    document.location=document.login.action.value+".pl?action=login&company="+document.login.company.value;
+        };
+ 	http.send("");
 }
 
 function check_auth() {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits