# NavigateToUrl - opening in a div

**URL:** <https://forum.kirupa.com/t/navigatetourl-opening-in-a-div/319905>\
**Category:** flash\
**Created:** [March 8, 2011, 11:16am UTC](https://forum.kirupa.com/t/navigatetourl-opening-in-a-div/319905 "2011-03-08T11:16:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heppa](https://avatars.discourse-cdn.com/v4/letter/h/e47774/32.png) [@Heppa](https://forum.kirupa.com/u/Heppa)\
**Post date:** [March 8, 2011, 11:16am UTC](https://forum.kirupa.com/t/navigatetourl-opening-in-a-div/319905/1 "2011-03-08T11:16:01Z")

</div>

Hi guys,

I have a strange problem that I can’t find any solution for.

In our Learning Management System we have a Flash front page that appears once the users is logged in. On this page we have a button that when clicked will go to the Course list.

The “Go to Courses” button is setup to navigate to “/course/index.jsp” and open this in a div called “arenamain”. This works in 98% of the cases but sometimes it will open the course list in a new blank window instead. This behaviour will continue until the user logs out of the system and logs in again (thereby reloading the flash front page).

I pasted the code below - is this not the correct way to open up a link in a div?

/Michael

```auto
 
 
function gotoCoursesClicked(event:MouseEvent):void{
 
trace ("Goto courses clicked");
 
var courses:URLRequest = new URLRequest("/course/index.jsp");
navigateToURL(courses, "arenamain");
};
 

```
