sassy_monix
12-09-2004, 03:51 PM
Hi!
I have a main page (main.php) and the are 2 iframes in it. The menu is located in main.php and what I want to happen is that the 2 iframes will change its contents when a link in the menu is clicked. Is there a way for me to do this?
I tried this code
function loadIframe(iframeName, url) {
frames[iframeName].location.href = url;
}
but I can't make it work when I place it in my link tag like this
<a href="#" onClick="javascript:loadIframe('mIframe','lesson.php')">google</a>
WHat's wrong with what I'm doing? Please somebody help me 'xoz I'm stuck! :eek:
I have a main page (main.php) and the are 2 iframes in it. The menu is located in main.php and what I want to happen is that the 2 iframes will change its contents when a link in the menu is clicked. Is there a way for me to do this?
I tried this code
function loadIframe(iframeName, url) {
frames[iframeName].location.href = url;
}
but I can't make it work when I place it in my link tag like this
<a href="#" onClick="javascript:loadIframe('mIframe','lesson.php')">google</a>
WHat's wrong with what I'm doing? Please somebody help me 'xoz I'm stuck! :eek: