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: 
Replace `<script type="text" language="javascript">` with `<script type="text/javascript" language="javascript">`
Your JS action is to be on onclick action, not on href, try this elow code

```
<a href="#" onclick="win1('<?php echo $j;?>')"
  onMouseOver="self.status='Open A Window'; return true;"><b>Open Window</b></a>

```