I have the following problem:
I am writing a code that submit a form to Target.jsp and display a content within Display.jsp after the form is submitted to Target.jsp.
How do I use response.Redirect("jsp/Display") within the following code?
<form method="POST" class="example" action="/project/jsp/Target.jsp" id=form >
<!--Some tags here-->
<input type="submit" name="submit" value="submit Changes" />
You can use
window.location.hreffor this.From client side JavaScript, this will navigate the browser to the new location.
However, evaluate if navigating to a new page is what you want? If you just need to display a piece of HTML returned after form submission, it might be wiser to use AJAX to capture that response and add it to the document tree, without navigating to different page.