Find the below code by which you can validate the email field using java-script on client side, var reg = /^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$/; if(!reg.test(document.getElementById(“email”).value)){ alert(“Please fill email address in correct format”); document.getElementById(’email’).focus(); return false; }

If you want to change the iframe url from the iframe window, you can use this small function to change the url of the iframe. <script type=”text/javascript”> $(document).ready(function() { $(‘#clickToClose’).click( function() { window.parent.frames[“myframe”].location.href=’frame.php’; return false; }); }); </script> Explanation of…