Jump to content

Submit button does nothing on a duplicated page


VenZ

Recommended Posts

Hello guys, I am new to coding. Currently, I am working on a demo project that uploads a photo and returns with the name of the person. So basically I use HTML and it consists of 2 pages, the first page - for users to upload photos and submit it while the second page - the recognized name in the photo will be shown. In order to make this work, I have a web service that I need to enable it for face recognition to work, firstly on the first page users take picture and press the submit button, the photo will be uploaded to the web service to perform recognition, after the image is recognized it will go to the second page to display the recognized person. The first page has a submit button, which is to upload the photo, but I wanted the submit button to be on the second page as well so that the users can submit another photo, without the need to go back to the first page. Since I want the Submit button on both pages, therefore I used the same code:

<form>
	<div class="upload-btn-wrapper">
		<button class="btn">Submit</button>
	</div>
</form>

It worked fine on the first page, but not on the second. Whenever I press the Submit button on the second page to upload another picture, the button redirects me back to the first page. Why is that? Hope to get some advises here. Thank You.

Link to comment
Share on other sites

There isn't enough code here to determine exactly what the problem is. The code shown here would submit the page to itself and do nothing since there are no fields in the form.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...