# Can't clone div object containing swf as object tag

**URL:** https://forum.kirupa.com/t/cant-clone-div-object-containing-swf-as-object-tag/290352
**Category:** Uncategorized
**Created:** [June 13, 2009, 7:36am UTC](https://forum.kirupa.com/t/cant-clone-div-object-containing-swf-as-object-tag/290352 "2009-06-13T07:36:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![deepumanoharan](https://avatars.discourse-cdn.com/v4/letter/d/d26b3c/32.png) [@deepumanoharan](https://forum.kirupa.com/u/deepumanoharan)
#### Post date: [June 13, 2009, 7:36am UTC](https://forum.kirupa.com/t/cant-clone-div-object-containing-swf-as-object-tag/290352/1 "2009-06-13T07:36:36Z")

</div>

I can’t clone a static div object,which contains a swf file at run time.The format of the div object i tried is given below

```auto

  <div id="PropDiv" style="position:absolute;z-index:200;width: 97px; height: 99px; left: 3px; top: 0px;">
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="Untitled-1" width="350" height="150" 
   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
   <param name="movie" value="Untitled-1.swf" />
   <param name="quality" value="high" />
   <param name="wmode" value="transparent"/>
   <param name="bgcolor" value="#869ca7" />
   <param name="allowScriptAccess" value="sameDomain" />
   <embed src="Untitled-1.swf" quality="high" bgcolor="#869ca7" width="500" height="375" name="Untitled-1" align="middle" play="true" loop="false" quality="high" allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
   pluginspage="http://www.macromedia.com/go/getflashplayer">
   </embed>
</object>
        </div>

```

I tried the javascript code for cloning the div object is given below

```auto

      var test=document.getElementById('PropDiv');
      alert("Testtttttttttttttttt"+test);
      if(test)
      {
            var tempDiv = test.cloneNode( true );
            if(tempDiv)
            {
            
                   
                    tempDiv.id="TestImage";
                    tempDiv.style.display = "block";
                    tempDiv.style.posLeft = 500;
                    tempDiv.style.posTop= 500;
                    document.body.appendChild(tempDiv);
            }

after this code i can't view the new cloned div object on the page,But i can see the flash player version on right clicking the position,where i set for the new div object.

Please give me solution to this
```
