find ifream source when create link from database
<p>i writing this code to fetch links from database,after clicking url's can show to iframe, but i can't get iframe real src:</p>

<pre><code>if ( mysql_num_rows($query) &gt; 0) 
{
   echo"&lt;li&gt;&lt;a href='#' class='alink'&gt;".$key.'&lt;/a&gt;';
   echo'&lt;ul&gt;';
   while($qsql=mysql_fetch_array($query)) 
        echo "&lt;li &gt;&lt;a href='{$qsql['ModuleAddress']}  target='links' class='alink'&gt;".$qsql['ModuleTitle'].'&lt;/a&gt;&lt;/li&gt;';
   echo'&lt;/ul&gt;';
   echo'&lt;/li&gt;';
}
</code></pre>

<p>my html link:</p>

<pre><code>&lt;a href="#" onclick="GetIFrameUrl();"&gt;
</code></pre>

<p>my iframe is:</p>

<pre><code>&lt;iframe width="100%" id="links" name='links' frameborder="0" src='arm.html' style="border: none;padding: 0;margin: 0;"&gt; &lt;/iframe&gt;
</code></pre>

<p>my js is:</p>

<pre><code>function GetIFrameUrl()
                {
                    var control = document.getElementById("links");
                    alert("iframe source = " + control.src);
                }
</code></pre>
