[jQuery] Howto: replace the current webpage with content from another webpage.
I am trying to define an "onclick" event to a form button, so that
when I click this button, content from another webpage will overwrite
this page (not open a new webpage). I've tried the below code (sample)
which is not working.
<form action="/script" method="post">
<..other elements../>
<input type="button" name="jump" value="Jump" />
</form>
<script type="text/javascript">
$(':button[name="jump"]').click(function() {
$(document).load('/path/to/another_page.html');
});
</script>
Any suggestions, many thanks...
lihao