# Flash MX Actionscript-Javascript Question

**URL:** <https://forum.kirupa.com/t/flash-mx-actionscript-javascript-question/36078>\
**Category:** flash\
**Created:** [November 21, 2003, 6:28pm UTC](https://forum.kirupa.com/t/flash-mx-actionscript-javascript-question/36078 "2003-11-21T18:28:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Umami](https://avatars.discourse-cdn.com/v4/letter/u/f4b2a3/32.png) [@Umami](https://forum.kirupa.com/u/Umami)\
**Post date:** [November 21, 2003, 6:28pm UTC](https://forum.kirupa.com/t/flash-mx-actionscript-javascript-question/36078/1 "2003-11-21T18:28:33Z")

</div>

I’m trying to get a new window to pop using existing javascipt handler which is used for all the pop-ups on a particular website. I got the window to pop using the \_blank. But now I need to access the existing jscript for the pop ups.

Existing Code is:

```
		&lt;script type="text/javascript" language="javascript"&gt;
	&lt;!--
		/* simple banner rotation */
		var banners = ['GreatRate_banner.swf']
		var ix = GetCookie('SMB_BANNER_IX')
		if ( !ix || (ix &gt;= banners.length) ) {
			ix = Math.floor(Math.random()*banners.length)
		}
		ix = parseInt(ix) // make sure ix is a number
		var banner = banners[ix]
		SetCookie('SMB_BANNER_IX', ++ix)
		if (banner) {
			var bannerHTML = '&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="352" height="52"&gt; \
				&lt;param name="movie" value="media/flash/' + banner + '"&gt; \
				&lt;param name="quality" value="high"&gt; \
				&lt;embed src="media/flash/' + banner + '" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="352" height="52"&gt; \
				&lt;\/embed&gt; \
			  &lt;\/object&gt;';
		}
		else {
			var bannerHTML = '&lt;img src="images/gui/default_banner.gif" alt="" width="352" height="52" vspace="5" border="0"&gt;'
		}
		document.write(bannerHTML)
	//--&gt;
	&lt;/script&gt;

```

I need to integrate this code:

\<a href=“[https://www.stmarysbank.com/forms/form\_begin.asp](https://www.stmarysbank.com/forms/form_begin.asp)” onclick=“return popUp(‘depositAppWin’, this.href)” title=“Apply Now!” onmouseover=“roll\_over(‘applyIcn’)” onmouseout=“roll\_out(‘applyIcn’)” target=“depositAppWin”\>\<img src="…/images/icons/apply.gif" alt=“Apply Now” width=“30” height=“30” align=“middle” hspace=“2” vspace=“2” name=“applyIcn” border=“0”\>Apply Now!\</a\>\<br\>
