I'm a little confused with the following code :

HTML :

```
<div class="playerContainer">
    <iframe id="playerFrame" name="playerFrame" frameborder="0"></iframe>
<div class="playerContainer">

```

Javascript :

```
var playerFrame1 = $("#playerFrame");
var playerFrame2 = window.frames["playerFrame"];
alert(playerFrame1); // returns [object object]
alert(playerFrame2); // returns [object Window]

```

My first question is why we get 2 different outputs.

When I try to embed a webpage using playerFrame1 as ID, nothing happens. But everything work fine with playerFrame2. Anybody knows why ?

Thank you.

PS : I have also tried

```
$('playerFrame'), $(iframe[name="playerFrame"]), document.getElementById("playerFrame")

```

No change.