Jump to content

pop up window is not being displayed


malcom p

Recommended Posts

My pop up window is not appearing. It is suppose to appear after my validation but even though the validation is working, the pop up window is not appearing. Does anyone have any ideas:

 

    function validation() {
    	var isDataValid = true;
    	var textO = document.getElementsByName("textBox1");               
        var errMsgO = document.getElementById("txtBox1Alert");

        if (textO.value == '') {
    	   errMsgO.innerHTML = "Text Box is empty";
    	   isDataValid = false;
        } else {
    	   errMsgO.innerHTML = ""; 
        }
        if(isDataValid) {
    	   function openSessionPopup (txt) {
     		 window.open(txt, 'window', 'width=500,height=500,scrollbars=yes,status=no');
           }  
    	}  
    }
    		
    function myClickHandler(){
        if(validation()){
           showSessionPopup();
        }
    }

In Html Form:

<!-- language: lang-html -->

     <p><input class="questionBtn" type="button" value="Prepare Questions" name="prequestion" onClick="myClickHandler()"/></p> 

Link to comment
https://forums.phpfreaks.com/topic/251456-pop-up-window-is-not-being-displayed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.