Jump to content

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

Change the following

function openSessionPopup (txt) {
    window.open(txt, 'window', 'width=500,height=500,scrollbars=yes,status=no');
} 

to

window.open('MY_URL', 'window', 'width=500,height=500,scrollbars=yes,status=no');

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.