Link to home
Start Free TrialLog in
Avatar of Shiva-Kumar
Shiva-Kumar

asked on

Window.open is getting blocked by the pop up blocker

hi,

I am using the following code to pop a window.  Now this pop up is getting blocked by the pop up blocker both in IE and firefox.

the onclick event doesn't blocks the pop up but the onkeydown event does.

Nother issue is sometimes the focus stays on the pop up window and sometimes not and the pop up window gets minimized.

Thanks,


<input type="text" name="question" id ="question" value="question" onfocus="this.value=' ';" onkeydown="if (event.keyCode == 13) showpopup();" /> 
<input type="image" name="AskButton" id="AskButton" src="qst.jpg" onclick = "showpopup();"  /></td></tr>
 <script language = "javascript:>
function showspopup(Obj)
{
 
 window.open('http://abcd-test.com','', 'width=825,height=625,toolbar=No,location=No,scrollbars=Yes,status=Yes,resizable=Yes,left=100');
 window.focus();
 return false;
  }
</script>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of baiju_nagori
baiju_nagori
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial