how to redirect to custom page

i need help with the following code
i want it to redirect me to a custom page if the file i search for does not exist

thank you

Untitled 1

.auto-style4 {
direction: rtl;
text-align: center;
}
.auto-style5 {
font-size: large;
}
.auto-style6 {
font-size: large;
font-weight: bold;
}

function get_sell_sheet(){
var part_number = document.getElementById(“part_number”).value;
var url = “” + part_number + “.pdf”;
// open in same window
// window.location.href = url;
// open in new window
var win = window.open(url, ‘_parent’);
}

Read more here:: how to redirect to custom page

Leave a Reply

Your email address will not be published. Required fields are marked *