There is a “buy” button that allow the user to click and go to the enquiry page with an input which should be automatically with the text “RE:enquiry on” when “buy” is clicked on,.
function storeitem(item_id)
{
sessionStorage.setItem("item_id", item_id);
window.location.replace("enquiry.html");
}
function displayitem()
{
document.getElementById("subject").value = "RE: Enquiry on " + sessionStorage.getItem("item_id");
}
<!-- product code -->
<a class="button" onclick="storeitem('Shoes')">
<button type="submit" name="button">Buy</button>
<!-- enquiry page -->
<tr>
<td><label id "subject">Subject:</label></td>
<td><input type="text" id="sbj" name="subject" value=""><br></td>
</tr>