Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Bom dia segue o código..... abaixo...
o sistema funciona, mas quero saber as brechas ou melhorias....
ajuda gelera.... http://forum.imasters.com.br/public/style_emoticons/default/joia.gif
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><script language="javascript">var AjaxRMS; function AjaxRequest(){ AjaxRMS = false; if (window.XMLHttpRequest) { AjaxRMS = new XMLHttpRequest();// Mozilla, Safari } else if (window.ActiveXObject) { try { AjaxRMS = new ActiveXObject("Msxml2.XMLHTTP");// IE } catch (e) { try { AjaxRMS = new ActiveXObject("Microsoft.XMLHTTP");// IE } catch (e) {} } } } function Carrega_dados(){ var logink = escape(document.getElementById('login').value); var senhak = escape(document.getElementById('senha').value); AjaxRequest(); if(!AjaxRMS){ return; } var url ="su.php"; var params = "login="+logink+"&senha="+senhak; // var params = "NeGocIO="+valor; AjaxRMS.onreadystatechange = Mostra_dados; AjaxRMS.open("POST", url, true); AjaxRMS.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); AjaxRMS.setRequestHeader("Content-length", params.length); AjaxRMS.setRequestHeader("Connection", "close"); AjaxRMS.send(params); } function Mostra_dados(){ if (AjaxRMS.readyState==1){ document.getElementById("resp").innerHTML="Carregando..."; } if(AjaxRMS.readyState == 4){ if(AjaxRMS.status == 200){ var resp = AjaxRMS.responseText; if(resp == 1){ document.getElementById('resp').innerHTML = 'Usuário Conectado'; } else { document.getElementById('resp').innerHTML = 'Erro de Login e Senha'; } } } } </script></head><body><form method="post" name="dlogin"><input name="login" type="text" value="" id="login"><input type="password" name="senha" value="" id="senha"><input type="button" name="ok" value="entrar" onClick="Carrega_dados()"></form><span id="resp"></span></body>Carregando comentários...