i am trying to have a functionality , where our app send verification email to confirm user to activate his/her online registration. i have below html code , where i want to open up a new window , when user clicks on "confirm email address" button.
<button id="emailVerificationBtn" onclick="javascript:openEmailVerificationPage('http://localhost:8080/myapp/tokens.html')"/>
and onclick, i am calling javascript to open up a new window, then after the verification gets completed.
<script>
function openEmailVerificationPage(url) {
document.getElementById("eamilVerificationForm").action = url;
window.open('', "TheWindow");
document.getElementById("eamilVerificationForm").submit();
}
</script>
i have tested this html in browser , it was working fine, but when it was send to user email, and user tries to click the button, the new window is not opening up. it is not working inside an email. i have check in ie, Mozilla, chrome with pop-up blocker disabled. but i am facing button click problem within the email.
EDIT - my form
<form id="eamilVerificationForm" method="post" target="TheWindow">