get the id of the image from another html file using javascript
<p>I using iframe for displaying a image. Here is my code.</p>

<p>index.html</p>

<pre><code>&lt;html&gt;
 &lt;head&gt;
    &lt;title&gt;Center&lt;/title
    &lt;script type="text/javascript"&gt;
            function sample(id){
               var frameht=document.getElementById("ifrm").style.height;
               var framewd=document.getElementById("ifrm").style.width;
           }
    &lt;/script&gt;
 &lt;/head&gt;
 &lt;body&gt;
    &lt;iframe style="width:700px;height:600px;" src="test.html" id="ifrm" onload="javascript:sample(this.id);"&gt;&lt;/iframe&gt;
 &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>test.html</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Center&lt;/title&gt;
    &lt;script type="text/javascript"&gt;

    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;img src="14.jpg" id="img1" onload="javascript:sample();"/&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I want the id of the image in index.html. Is it possible to get? Any one can help? Please!</p>
