Question: I try to use window.open but so far it doesn't work

```
<script type="text" language="javascript">    
function win1(j){
    window.open("ctry.php?j=" + j,"Window1","menubar=no,width=460,height=360,toolbar=no");
}
</script>

<?php
for($j = 1; $j <= 2; $j++){  
?>
<a href="javascript:win1('<?php echo $j;?>')" 
  onMouseOver="self.status='Open A Window'; return true;"><b>Open Window</b></a>
<?php
}
?>

```

When I click on the link nothing happened and on the console i get this error: 

```
Uncaught ReferenceError: win1 is not defined 

```

Do you know what can i do?
Thanks

Answer: 
use this

```
<script type="text/javascript" language="javascript">
function win1(j){
    window.open("ctry.php?j=" + j,"Window1","menubar=no,width=460,height=360,toolbar=no");
}
</script>

<?php
for($j = 1; $j <= 2; $j++){  
?>
<a href="javascript:void(0)"  onMouseOver="self.status='Open A Window'; return true;" onClick="win1('<?php echo $j;?>')"><b>Open Window</b></a>
<?php
}
?>

```
Are you putting this code inside body tag or inside head? Cause you cannot put html in head