Passing User login information from one HTML page to another

Could any one tell me a simple example where a user is presented with a login page(login.html), enters his username and password, the login details are used to call a webservice using AJAX POST and once username is retrieved, I need to redirect it to another page (home.html). So basically all this is happening using HTML and Javascript and no server side language involved here.

Here is the simple login form I have:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>
<head>	
<title>Accounting</title>
<style type="text/css">
		html,body{height: 100%; padding:0; margin:0;}
		form{ width:30em;height:9em; margin:-5em auto 0 auto; position: relative; top:50%; border:1px dotted #ccc; padding:.25em; }
		fieldset{ margin:0;   border:0;padding:0;}
		legend{float:left; font-size: 200%; text-align: center; color:blue; font-weight: bold; border-bottom: 1px solid blue; width:15em;  padding:0; }
		label, label+ input {display:inline; float:left;margin-top:1em;}
		label{text-align: right; width:28%; clear: left; margin-top:.8em; }
		label+ input{ width:60%; padding:.25em; ; margin-left:.5em; border: 1px inset;  margin-left: }
		#sub{  margin-top:1em; position: relative; float:left;clear: left; margin-left: 29%}
</style>
</head>
<body>

	<form >
		<fieldset><legend>User Login Page</legend>
			<label for="name">UserName: </label><input  type="text" name="name" id="name" value="">
			<label for="password">Password: </label><input  type="password" name="password" id="password" >
			<input type="submit" value="Login" id="sub">
		</fieldset>	
	</form>
</body>
</html>

Please delete this post as it’s no longer needed.

I really don’t think SitePoint deletes threads that the OP thinks are no longer needed. There’s chance the topic might be of interest to other members - who know what kind of useful discussion might come from it.

That is correct, we do make exceptions if there is something sensitive in the topic, but this one doesn’t seem to indicate that. We’d much prefer if you’d share your solution with us @Jack_Tauson_Sr, that way others could learn from it! :slight_smile:

Oh okay. I actually abandoned that approach and hence no longer working on it. Therefore there isn’t any solution related to that. Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.