# \[MX\] problem with calling up JavaScript function

**URL:** <https://forum.kirupa.com/t/mx-problem-with-calling-up-javascript-function/70143>\
**Category:** flash\
**Created:** [November 10, 2004, 11:40pm UTC](https://forum.kirupa.com/t/mx-problem-with-calling-up-javascript-function/70143 "2004-11-10T23:40:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![milo56279](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@milo56279](https://forum.kirupa.com/u/milo56279)\
**Post date:** [November 10, 2004, 11:40pm UTC](https://forum.kirupa.com/t/mx-problem-with-calling-up-javascript-function/70143/1 "2004-11-10T23:40:23Z")

</div>

This is my javascript:

function loadIframe(iframeName, url) {  
if ( window.frames[iframeName] ) {  
window.frames[iframeName].location = url;  
return false;  
}  
else return true;  
}

This is my html:

\<a href=“page1.html” onclick=“return loadIframe(‘ifrm’, this.href)”\>Page 1\</a\>

I’ve tried this:  
getURL(return loadIframe(‘ifrm’, page1.html));

and this:  
getURL(“page1.html” onclick=“return loadIframe(‘ifrm’, this.href)”);

…and they both don’t work. Please help me.

Thanks in advance.

-Matthew
