# Making URL links go to targets on page

**URL:** <https://forum.kirupa.com/t/making-url-links-go-to-targets-on-page/113434>\
**Category:** Uncategorized\
**Created:** [June 17, 2004, 8:57pm UTC](https://forum.kirupa.com/t/making-url-links-go-to-targets-on-page/113434 "2004-06-17T20:57:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgarcia1234](https://avatars.discourse-cdn.com/v4/letter/m/6bbea6/32.png) [@mgarcia1234](https://forum.kirupa.com/u/mgarcia1234)\
**Post date:** [June 17, 2004, 8:57pm UTC](https://forum.kirupa.com/t/making-url-links-go-to-targets-on-page/113434/1 "2004-06-17T20:57:43Z")

</div>

I had just created a flash menu navigation where I have different buttons open different HTML pages. I used the “normal mode” to click & fill-in the ActionScript code to make my buttons function. However, when I use the “getURL” function and type in my relative URL link with the “#” sign and the target, the page doesn’t go to the target on the page. This is an example of how the code looks:

on (release) {  
getURL(“mypage.htm#mytarget”);  
}

It opens the page fine, but it won’t go to the target IN the page. It just brings it right to the top of the page as if I didn’t have the ‘#mytarget’ there at all. I’ve used this method for making regular text hyperlinks in HTML, and I thought it would work the same with the ‘getURL’ function in Flash. I guess not.

Can anyone tell me what I have to do to make Flash open up the page and then go to the target on the page just like a regular HTML hyperlink?

HELP!!

~ Mark G.  
[mgarcia1234@hotmail.com](mailto:mgarcia1234@hotmail.com)

---

<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:** [June 17, 2004, 10:18pm UTC](https://forum.kirupa.com/t/making-url-links-go-to-targets-on-page/113434/2 "2004-06-17T22:18:48Z")

</div>

should work, try the exact same code to an anchor on the same page the swf is in.  
if that’s ok, find a way to open the new page passing the anchor name and then call a body onload javascript to go there…?
