# Javascript into getURL

**URL:** https://forum.kirupa.com/t/javascript-into-geturl/200080
**Category:** Uncategorized
**Created:** [September 8, 2006, 2:40pm UTC](https://forum.kirupa.com/t/javascript-into-geturl/200080 "2006-09-08T14:40:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pedro\_paulo](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pedro_paulo/32/2017_2.png) [@pedro\_paulo](https://forum.kirupa.com/u/pedro_paulo)
#### Post date: [September 8, 2006, 2:40pm UTC](https://forum.kirupa.com/t/javascript-into-geturl/200080/1 "2006-09-08T14:40:05Z")

</div>

Hy guys!

I have a big problem here:

This actions are on the button:

> 

on (release) {  
url = “javascript:if(window.closeVivoChat)window.closeVivoChat(),void(0);”  
getURL(url);  
trace(url);  
gotoAndStop(1);  
}

The problem is: when I click the button in the first time, the getURL method calls javascript as I need. Ok. But when I click it on a second time, flash opens a new window looking for a common URL, like [http://javascript](http://javascript) etc.

Why it happens?

Any suggestion?

cheers!

pp
