Greetings to everyone,

I am trying to use Javascript to do the following:

- When a user clicks on a button, open a new browser window with specific dimensions (e.g 500x500).
- The new popup window must be behind the current web browser.

So far, I've got my script working and does the following:

- Opens a new browser window (full size)
- The window pops in front of the current page.

Here is the code I am using:

if ($ok) {?>
<script type="text/javascript">
window.onload=function() {
var w ="","_blank");
if (!w) alert('Sorry, you have blocked popups')
<?php } ?>

Can someone kindly advise on how I should modify the above code to complete my goal?

Please note that I am not a programmer and have very limited knowledge on Javascript.

Many thanks in advanced!