# AS3 URL links open in new page? Why?

**URL:** <https://forum.kirupa.com/t/as3-url-links-open-in-new-page-why/247039>\
**Category:** Uncategorized\
**Created:** [December 17, 2007, 11:38pm UTC](https://forum.kirupa.com/t/as3-url-links-open-in-new-page-why/247039 "2007-12-17T23:38:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darren\_E](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@Darren\_E](https://forum.kirupa.com/u/Darren_E)\
**Post date:** [December 17, 2007, 11:38pm UTC](https://forum.kirupa.com/t/as3-url-links-open-in-new-page-why/247039/1 "2007-12-17T23:38:26Z")

</div>

Can someone help me with this line of code?  
When the button is pressed, it tries to open in a new tab or in a new window (depending on if you are using Firefox or IE) and first gets blocked by the pop up blocker.

How can I make this where it opens without targeting “\_blank” ???

```auto
{
    var targetURL:URLRequest = new URLRequest("http://nameofwebsite.com/about.htm");
    navigateToURL(targetURL);
this.addEventListener(MouseEvent.CLICK, goURL);
}

```

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![DarkGloveLove](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@DarkGloveLove](https://forum.kirupa.com/u/DarkGloveLove)\
**Post date:** [June 16, 2008, 11:04pm UTC](https://forum.kirupa.com/t/as3-url-links-open-in-new-page-why/247039/2 "2008-06-16T23:04:48Z")

</div>

Hi,

I’m trying to get my links to open in a new tab, not a new window. I have tried using all of the above. They just open the link in the tab that I am already in… I want my page to stay open but don’t want the new page to open in a new window.

I don’t understand :crying:

Any ideas?

Cheers,

DGL

(IE7, AS3)
