Below is the JQuery code snippet shows how to submit form dynamically:
<script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $("button").click(function () { var form = $("<form>", { 'action': 'your-desired-url-here', 'target': '_top' }); $(document.body).append(form.hide()); form.submit(); }); }); </script> <button>Submit</button>