I'm currently having a weird problem.

I'm using JqueryUI tabs, and am loading php pages with each tabs. This works well for me, but what I am trying to do, is loading another php page from within one of those tabs with the html "a" tag. For some reason, it doesn't work when I place the click function in a already linked javascript file, but works when I place the code in a script tag directly in the html file.

Here is the function:

```
$(function(){
    $('a.commandsRecep').on('click',function(e){
        e.preventDefault();
        window.open(this.href,'','width=700,height=700');
    });
})

```

I know that loading pages from within a tab is done by Ajax and am wondering if that's what causing me problems.

The link is inside a table :

```
<td><a class="commandsRecep" href="./Ben_test/page_principale.php">R&eacute;ception des commandes</a></td>

```