# Javascript function from flash, wont work

**URL:** <https://forum.kirupa.com/t/javascript-function-from-flash-wont-work/195718>\
**Category:** flash\
**Created:** [August 2, 2006, 4:55pm UTC](https://forum.kirupa.com/t/javascript-function-from-flash-wont-work/195718 "2006-08-02T16:55:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![grant\_mccall](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@grant\_mccall](https://forum.kirupa.com/u/grant_mccall)\
**Post date:** [August 2, 2006, 4:55pm UTC](https://forum.kirupa.com/t/javascript-function-from-flash-wont-work/195718/1 "2006-08-02T16:55:36Z")

</div>

Hey everyone,

Im trying to achieve what should be a simple task. I have written a function in javascript which resizes and changes the source of a HTML iframe. Now I need to activate this function from a button in my flash movie. I have looked at heaps of tutorials on how to do this, but I just cant get it to work. I am using flash 8 if its important.

My javascript function is as follows:  
function resetframe() {  
framechange = document.getElementById(‘results’);  
framechange.src = ‘…/frametest2.html’;  
framechange.height = ‘800px’;

}

which works fine…

Now my actionscript on my button in flash:

on(press) {  
getURL(“javascript:resetframe()”);  
}

If someone could help me out that would be awesome.

Cheers.

Grant
