As the others have said, if you want to change the page, just use document.location
. I do have a few other tips for you though:
$('#displayPanel #save #saveForm')
This is unnecessary and slower to run. Just change it to $('#saveForm')
and the query will only need to do one lookup.
.live('click', ...
Given how specific your selector is, I'd suggest that using live
is also unnecessary. live
is meant to be used to apply events to large numbers of elements which may be added to the DOM at any point after the binding. Since you've only got one element with the id saveForm
, just apply a click handler to that element normally.
Though, all that said, if all you want is your button to post the form and take the user to the homepage, you don't need any javascript or jQuery, just plain HTML.
<form method="post" action="homepage.html">
<input type="submit" value="Go to homepage" />
</form>