See the example HTML Button onclick Redirect with Example. The Overflow Blog The way is quite simple; by placing the button code in place of anchor text the button can be used as HTML button link. W3Schools is optimized for learning, testing, and training. I used the src option and browsed to the appropriate page, but it will not take me to that page upon pressing the submit button. So in this file, we have a header of Articles page and then a form that contains one text box and a submit button. Open link redirect by onclick on button. The first submit button submits the form data to "action_page.php", and the second submits to "action_page2.php": Notice that the method is POST and the action attribute of the form is set equal to, {% url 'Articles:successpage' %} So in order to create a dynamic URL, you have to specify {% url %}. The first submit button submits the form data
Now your second form will be called to second servlet. I had the site all ready now but I can't make a submit button save and redirect to the submitted registration page, this is my whole code:I don't know what to put in the code to make it save the records and redirect to another pageAnd there are many ways for submission of form and redirect.