Need some help with a webpage

Hi all. I came here because I need some help. I’m a ceramicist and have this idea for a project. I have a bit of an idea of what I need to do but am not sure how to get it to work.
So I’m putting barcodes on all my pieces and I want the webpage I’m building to pull up another page when the barcode is scanned.
I’ve been told that I need a page with a form and an iframe. I have that done, but I need some more help. The form has one input box for the barcode. I need .html added to the end of whatever is in the input box to pull up a specific page for the barcode and pulling that up into the iframe on submit. And if possible on load to clear the form box and set the form box back to focus, so that it is ready to scan another barcode. I want it to do this so that when the piece is installed the laptop can be hidden from view.
I would appreciate some help to walk me through the code to do this.
Thanks so much in advance