# getURL and java

**URL:** <https://forum.kirupa.com/t/geturl-and-java/202709>\
**Category:** Uncategorized\
**Created:** [October 4, 2006, 4:22am UTC](https://forum.kirupa.com/t/geturl-and-java/202709 "2006-10-04T04:22:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bed718](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@bed718](https://forum.kirupa.com/u/bed718)\
**Post date:** [October 4, 2006, 4:22am UTC](https://forum.kirupa.com/t/geturl-and-java/202709/1 "2006-10-04T04:22:44Z")

</div>

Hi,

I have been trying to get my flash navigation to load HTML content into my page with out reloading the whole page. I have gotten pretty far using “Ajax”…

[http://b-ed.com/green\_cradle/green\_test4.html](http://b-ed.com/green_cradle/green_test4.html)

I can get it to work if my links are hard coded like this:

```auto
my_btn.onRelease=function(){
   getURL("javascript:mypage('content.htm', 'leftcolumn')");
}

```

This works perfect… However, I want to be able to load the ‘content.htm’ part in dynamicly (using XML).  
I set a variable “say” link to = “javascript:mypage(‘content.htm’, ‘leftcolumn’)” (including the quotes b/c i know the getURL needs them…

Then when I try to pass tat var through the getURL like this:

```auto
my_btn.onRelease=function(){
   getURL(link);
}

```

It does not work. When i publish the page the link should load content into the ‘leftcolumn’ \<div\> instead it opens a new window and gives me the 404 error that that page cant be found…

Is ther a way to pass a var through the getURL that will work???  
Is there a better way all together??
