getElementById Where Element is dynamically created at runtime
<p>I have created an object at runtime by using innerHTML tag, now I want to access this element by using getElementById, when I accessed the element its return NULL value. Kindly suggest me any direction so that I can acheive this,</p>

<p>Here is the following code hint which I am using</p>

<p>In HTML</p>

<pre><code>&lt;div id="web"&gt;
&lt;object id="test"&gt;&lt;/object&gt;
&lt;/div&gt;
</code></pre>

<p>In JS</p>

<pre><code>document.getElementById("web").innerHTML="&lt;object id='test2'&gt;&lt;/object&gt;";
.
.
var obj = document.getElementById("test2");
</code></pre>

<p>Here obj return null value.</p>
