As the index.html isn't processed on the server, you have to use some client side logic to transfer data from one page to the other. You could use session storage, local storage, cookies or just the url.
An easy way would be to just pass an indicator inside the url hash. To achieve this, you could modify your window.location
like this
window.location = "/#success";
and inside the index.html just test, if the url hash is equal to #success
<script>
if (window.location.hash == '#success') {
alert('Success message..!');
}
</script>