Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Bug in firefox Origin header</title>
- <script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
- </head>
- <body>
- <script type="text/javascript">
- $.extend(
- {
- redirectPost: function(location, args)
- {
- var form = '';
- $.each( args, function( key, value ) {
- form += '<input type="hidden" name="'+key+'" value="'+value+'">';
- });
- $('<form action="' + location + '" method="POST">' + form + '</form>').appendTo($(document.body)).submit();
- }
- });
- var redirect = 'https://example.com/postpage';
- $.redirectPost(redirect, {somedata: "test"});
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement