Forum Moderators: open

Message Too Old, No Replies

Open Pop up

         

andrewsmd

1:07 pm on Apr 26, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is wrong with this JS. My debugger console shows now error but the new window does not open.

<script type='text/javascript'>
function callBackWindow(url) {

window.open(url, 'OpenWindow', 'width=1000,height1000,left=-10,top=-10,scrollbars=no');
return false;

} //callBack
callBackWindow("callBack.aspx");
</script>

rainborick

1:57 pm on Apr 26, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



height1000

should be

height=1000

andrewsmd

2:38 pm on Apr 26, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I changed that but still no luck. I should mention I'm generating the call of the function with a code behind. However here is the html that is generated. Any ideas?


function callBackWindow(url) {



window.open(url, 'OpenWindow', 'width=1000,height=1000,left=-10,top=-10,scrollbars=no');

return false;



} //callBack

Then later in the file
callBackWindow('http://domain.com/callBack.aspx');

Fotiman

3:07 pm on Apr 26, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



[msdn.microsoft.com...]

The Pop-up Blocker blocks script-initiated pop-up windows that are created by the following methods, without the user clicking a link. If users enable the most restrictive setting in the Pop-up Blocker Settings, the Pop-up Blocker blocks windows that are opened by these methods from a user-initiated action, such as clicking a page element or tabbing to a link and then pressing ENTER.

window.open
window.showHelp
window.showModalDialog
window.showModelessDialog
window.external.NavigateAndFind

Fotiman

3:14 pm on Apr 26, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Note also that Firefox will report that it prevented the site from opening a pop-up window.