# Add div to webpage from Flash

**URL:** <https://forum.kirupa.com/t/add-div-to-webpage-from-flash/260366>\
**Category:** flash\
**Created:** [May 14, 2008, 8:16pm UTC](https://forum.kirupa.com/t/add-div-to-webpage-from-flash/260366 "2008-05-14T20:16:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rocketrud](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@Rocketrud](https://forum.kirupa.com/u/Rocketrud)\
**Post date:** [May 14, 2008, 8:16pm UTC](https://forum.kirupa.com/t/add-div-to-webpage-from-flash/260366/1 "2008-05-14T20:16:36Z")

</div>

I’m making an expandable ad and it is working perfectly except for one flaw. The expanded part of the ad is currently hard coded into the index files div. Like below…

\<div style=“width: 518px; height: 0px;visibility:hidden” id=“windowcontent”\>  
\<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000”  
codebase=“[http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0](http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0)”  
width=“738” height=“500” id=“Popup” align=“middle”\>  
\<param name=“allowScriptAccess” value=“sameDomain” /\>  
\<param name=“movie” value=“bannerads/Popup.swf” /\>  
\<param name=“wmode” value=“transparent” /\>  
\<param name=“scale” value=“exactfit” /\>  
\<param name=“quality” value=“high” /\>  
\<param name=“bgcolor” value="#333" /\>  
\<param name=“Popup” value=“true” /\>  
\<embed src=“bannerads/Popup.swf” name=“Popup” allowScriptAccess=“sameDomain”  
type=“application/x-shockwave-flash” pluginspage=“[http://www.adobe.com/go/getflashplayer](http://www.adobe.com/go/getflashplayer)”  
quality=“high” bgcolor=“FFFFFF” width=“738” height=“500” wmode=“transparent” align=“middle” /\>  
\</object\>  
\</div\>

I would like to be able to have my index page keep this part…

\<div style=“width: 518px; height: 0px;visibility:hidden” id=“windowcontent”\>

\</div\>

and from the flash file when I rollover the swf I would like it to add whatever swf I tell it to add to the “windowcontent” div…
