JSFiddle - React, Tailwind, and code Playground

by cstigler

HTML

<form method="post" action="http://www.zaption.local:3000/sso/lexisnexis/login">
    <input type="hidden" name="id" value="44">
    <input type="hidden" name="email" value="[email protected]">
    <input type="hidden" name="name" value="John Smith">
    <input type="hidden" name="timestamp" value="1435621414">
    <input type="hidden" name="sig" value="a2e4eec9be7daed1a99b96f7f724079c3d5a8364175b51caae9b3d14e1fce5bc">
    <input type="hidden" name="redirect" value="http://www.lexisnexis.com/">
        
    <button type="submit" id="zaptionSSOButton">Log In</button>
</form>

JavaScript

/* $("#zaptionSSOButton").click(function() {
	var xmlhttp;
	if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp = new XMLHttpRequest();
	} else { // code for IE6, IE5
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	}

	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {

		}
	}

	var requestParameters = {
		id: "44",
		email: "[email protected]",
		name: "John Smith",
		timestamp: "1435621414",
		sig: "a2e4eec9be7daed1a99b96f7f724079c3d5a8364175b51caae9b3d14e1fce5bc",
		redirect: "http://www.zaption.local:3000"
	};

	xmlhttp.withCredentials = true;

	var paramString = jQuery.param(requestParameters);

    console.log("paramString: " + paramString);

	xmlhttp.open("POST", "http://www.zaption.local:3000/sso/lexisnexis/login", false);
	xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlhttp.send(paramString);
	alert(xmlhttp.responseText);
}); */