# Help for getURL with a JavaScript

**URL:** <https://forum.kirupa.com/t/help-for-geturl-with-a-javascript/159936>\
**Category:** flash\
**Created:** [August 22, 2005, 1:52am UTC](https://forum.kirupa.com/t/help-for-geturl-with-a-javascript/159936 "2005-08-22T01:52:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthewjumps](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@matthewjumps](https://forum.kirupa.com/u/matthewjumps)\
**Post date:** [August 22, 2005, 1:52am UTC](https://forum.kirupa.com/t/help-for-geturl-with-a-javascript/159936/1 "2005-08-22T01:52:18Z")

</div>

Could someone tell me how to incorporate a variable into a getURL like so -

getURL (“javascript:NewWindow=window.open([color=red] **'I want to insert a variable HERE** [/color]’,’’,‘width=600,height=500,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No’); NewWindow.focus(); void(0); return false;”);  
}

I want to be able to generate a new window that just loads into it an image that’s in the sites directory. I know it can be done in javascript, cause this code works in a html page

\<a href="" " onclick="window.open(’**[color=seagreen]#fullSiteTextImage#/#uploadTextImageDirectory#/large\_#strTextImageImage#[/color]**’,’’, ‘width=600,height=500,noscrollbars’); return false;\>

The green bit is a CFM variable, which contains something like flash/flash\_images/image.jpg

So how can I do this from flash? I KNOW it can be done. It must be possible, someone please help me. The thing that seems to stuff it up to me is the fact that I have to enclose the getURLs URL parameter in quotes, so flash doesnt evaluate the variable.

If that is the problem, how can I get around it. Also, I dont know javascript very well, so if theres anything wrong with my java, please tell me!

Help!
