havenpets Posted May 20, 2010 Share Posted May 20, 2010 In Google chrome and Firefox my script works wonders. It looks amazing! However, in internet explorer there seems to be a minor problem. Once a login credential has been submitted (e.g. Username: hi, Password: hi) you cannot submit the form again with the same credentials. Seems like a security thing IE does so it's not viewing the same web page as before. Code: function check_credentials(){ httpObject = getHTTPObject(); if (httpObject != null) { httpObject.open("GET", "/xatron/login.php?username="+escape(document.getElementById('username').value)+"&password="+escape(document.getElementById('password').value), true); httpObject.send(null); httpObject.onreadystatechange = function() { setOutput(); } } } function setOutput(){ if(httpObject.readyState == 4){ // alert(httpObject.readyState); *** This is a test line... login_run(httpObject.responseText); } } function login_run(login_answer){ login_answer = login_answer; if(login_answer == 0){ // alert false }else{ document.location.href='/xatron/welcome.php'; } And the form: <table width="90%" cellspacing="0" cellpadding="0"> <tr> <td width="50%">Username:</td> <td width="50%"><input type="text" id="username" /></td> </tr> <tr> <td width="50%">Password:</td> <td width="50%"><input type="password" id="password" /></td> </tr> </table> I am using jquery for the submit, but it's not the jquery giving the problems, it's the AJAX. any advice? Should "get" be "post" maybe?! Not sure. Quote Link to comment Share on other sites More sharing options...
havenpets Posted May 20, 2010 Author Share Posted May 20, 2010 Lol wow why was I thinking forms with the "GET" and "POST" thing? Ha ha Sorry about that! Quote Link to comment Share on other sites More sharing options...
havenpets Posted May 20, 2010 Author Share Posted May 20, 2010 I worked around IE's caching... random = Math.floor(Math.random()*999999); and added +"&random="+random to the URL so it's a different link every time! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.