# Set homepage through flash

**URL:** <https://forum.kirupa.com/t/set-homepage-through-flash/221308>\
**Category:** Uncategorized\
**Created:** [April 3, 2007, 9:34am UTC](https://forum.kirupa.com/t/set-homepage-through-flash/221308 "2007-04-03T09:34:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![twistedpixel](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@twistedpixel](https://forum.kirupa.com/u/twistedpixel)\
**Post date:** [April 3, 2007, 9:34am UTC](https://forum.kirupa.com/t/set-homepage-through-flash/221308/1 "2007-04-03T09:34:01Z")

</div>

Hi,  
This is my very first post to this forum, i have a flash menu in which there is a button called “set HomePage”, when clicked should just execute a js function that’s defined in the html file. But it doesn’t work.

The actionscript i call on the button is :

```auto

on (press) {
getUrl('javascript:setHome();');
}

```

and on the HTML file i have

```auto

function setHome()
{
   window.alert("Clicked") 
   document.body.style.behavior='url(#default#homepage)';
   document.body.setHomePage(window.location.href);
}

```

What happens is that, when i issue a command before document.body(in this case the window.alert), this command fires but it gives an error in IE saying “Permission Denied”. I don’t know where to set this.

Can anyone help ?..or is there a better way for this ?..I have posted accross many forums but no luck.
