# Adding a variable to a getURL line (correct way to code it)

**URL:** https://forum.kirupa.com/t/adding-a-variable-to-a-geturl-line-correct-way-to-code-it/190582
**Category:** flash
**Created:** [June 13, 2006, 6:23am UTC](https://forum.kirupa.com/t/adding-a-variable-to-a-geturl-line-correct-way-to-code-it/190582 "2006-06-13T06:23:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![messlah](https://avatars.discourse-cdn.com/v4/letter/m/c37758/32.png) [@messlah](https://forum.kirupa.com/u/messlah)
#### Post date: [June 13, 2006, 6:23am UTC](https://forum.kirupa.com/t/adding-a-variable-to-a-geturl-line-correct-way-to-code-it/190582/1 "2006-06-13T06:23:18Z")

</div>

Hey all, all I want to do is add a variable to a getURL line of [code](http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_21884165.html#).

EG:  
getURL("/index.asp", “\_self”);

I need to add a variable (\_root.myvariable) to the end of the link so that it goes to:  
index.asp?myvar=thevalueofmyvariable

Just not sure on the correct way to code it.

Any hlep would be great.
