malcom p Posted November 20, 2011 Share Posted November 20, 2011 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> Quote Link to comment https://forums.phpfreaks.com/topic/251456-pop-up-window-is-not-being-displayed/ Share on other sites More sharing options...
nogray Posted November 20, 2011 Share Posted November 20, 2011 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'); Quote Link to comment https://forums.phpfreaks.com/topic/251456-pop-up-window-is-not-being-displayed/#findComment-1289659 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.