abdfahim Posted January 11, 2008 Share Posted January 11, 2008 I want that when I press submit button, this will check whether a text box is empty. If not, then it will open a pop up and load form action page there. I can do that individually, but the problem is when I want to join this two codes, the pop up is not shown. Instead a new page opens. Here is the code <script LANGUAGE="JavaScript"> function abc(){ if (document.myform.mytextbox.length==0){ alert("Error Message."); return false; }else{ return true; } } </script> <form name="myform" method="post" action="showdata_bsc.php" onSubmit="return abc();w=window.open('about:blank','mypage','width=800,height=600, scrollbars=yes, resizable=yes');w.focus();" target="mypage"> </form> Quote Link to comment Share on other sites More sharing options...
rajivgonsalves Posted January 11, 2008 Share Posted January 11, 2008 put the window.open() in your function Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.