jQuery - Redirect with post, Get data php (ok)
https://github.com/mgalante/jquery.redirect
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="jquery.redirect.js"></script>
</head>
<body>
<button type="button" name="button">TEST</button>
<script type="text/javascript">
//Log instead of redirect for testing purposes
jQuery(function($) {
$("button").click(function() {
$.redirect("http://localhost/ajaxsubmit/test.php",
[{
user: "johnDoe",
password: "12345",
submit: "name",
phones: [
{ area: "11", number: "4444444" },
{ area: "22", number: "5555555" }
]
},
{
user: "gastonJones",
password: "5431",
submit: "Gastón Jones",
phones: [
{ area: "11", number: "41321" }
]
}],
"POST", null, null, true);
});
});
</script>
</body>
</html>
Last updated