Try adding your HTML input elements wherever you want the nested form to be. Then use jQuery to change the page form action to point to an external website. The whole form is presented, but with a different external URL. A small drawback is the values for all the input elements on the page, but in most cases this does not really matter.
(I just tried this using POST, not GET. This is basically a Roman O # 3 workaround in more detail)
<div id="nested-form">
<input type="text" name="q">
<input name="searchbtn" value="Go" type="submit" class="search-button">
</div>
<script>
$(function() {
$("input.search-button").click(function() {
$('form').get(0).setAttribute('action', 'http://external.com');
});
});
</script>
source
share