I was trying to submit the form data to https://wallpapersforandroid.com/wallpaper-4/" in new tab and redirect the parent page to "https://www.youtube.com" after submission. I do success to open the action page in new tab but the parent page is not redirecting The code I used:
<form action="https://wallpapersforandroid.com/wallpaper-4/" method="post" target="_blank">
Type Password From Below Image: <input name="pass" type="text" />
<input id="myForm" type="submit" /><br />
<script>
document.getElementById("myForm").onsubmit = function() {
window.location.href = "https://www.youtube.com";
};
</script>
window.location = "https://www.youtube.com"