# Within a javascript get url command, how do I insert variables

**URL:** <https://forum.kirupa.com/t/within-a-javascript-get-url-command-how-do-i-insert-variables/8442>\
**Category:** flash\
**Created:** [November 21, 2002, 10:20am UTC](https://forum.kirupa.com/t/within-a-javascript-get-url-command-how-do-i-insert-variables/8442 "2002-11-21T10:20:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![3dron](https://avatars.discourse-cdn.com/v4/letter/3/2acd7d/32.png) [@3dron](https://forum.kirupa.com/u/3dron)\
**Post date:** [November 21, 2002, 10:20am UTC](https://forum.kirupa.com/t/within-a-javascript-get-url-command-how-do-i-insert-variables/8442/1 "2002-11-21T10:20:28Z")

</div>

i have:

getURL("javascript:openNewWindow(‘[http://www.test.com/add=1&name=itest\_tem,‘testwin’,'width=600,height=400,scrollbars,location,resizable,status](http://www.test.com/add=1&name=itest_tem,'testwin','width=600,height=400,scrollbars,location,resizable,status)’)  
");

How would insert variables to change the add value? It doesnt seem to work with syntax like

getURL("javascript:openNewWindow(’“[http://www.test.com/add=](http://www.test.com/add=)” + addvalue +  
“&name=test\_item”,‘testwin’,‘width=600,height=400,scrollbars,location,resizable,status’)  
");

Please help

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 21, 2002, 6:19pm UTC](https://forum.kirupa.com/t/within-a-javascript-get-url-command-how-do-i-insert-variables/8442/2 "2002-11-21T18:19:39Z")

</div>

i notice you have a double quote after test\_item. shouldn’t that be a single quote?

rest assured, you can pass variables like this from flash.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 21, 2002, 7:12pm UTC](https://forum.kirupa.com/t/within-a-javascript-get-url-command-how-do-i-insert-variables/8442/3 "2002-11-21T19:12:57Z")

</div>

That double quote is what closes my quote for:  
“&name=test\_item”

So I am trying to add the following together:

“[http://www.test.com/add=](http://www.test.com/add=)”

- addvalue +

“&name=test\_item”

What am I doing wrong?

Ron

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 21, 2002, 9:17pm UTC](https://forum.kirupa.com/t/within-a-javascript-get-url-command-how-do-i-insert-variables/8442/4 "2002-11-21T21:17:24Z")

</div>

That should work:

```php
add1=12
getURL("javascript:open('http://www.waever.com?add=" + add1 + "&name=itest_tem','testwin','width=600,height=400,scrollbars,location,resizable,status');");

```

yours,  
h88
