Hi,
I have a Flash menu (Flash MX) and it has links that will open in a <div> in my html document, through a javascript function.
Flash code relating to the javascript:
getURL("javascr ipt:loadLeft('e squerda', '" + subleft[__reg3][__reg2] + "','400','179') " );
getURL("javascr ipt:loadPage('c onteudo', '" + subLink[__reg3][__reg2] + "','400','721') " );
Javascript in the HTML document:
[CODE=javascript]<script language="JavaS cript">
function loadLeft(id,url ,varheight,varw idth) {
// create iframe inside content div
document.getEle mentById(id).in nerHTML = "<iframe name='IFrameLef t' frameborder='no ' scrolling='no' width='" + varwidth +"' height='" + varheight + "'></iframe>";
// set the iFrame's height
document.all.IF rameLeft.height = varheight;
// insert content of HTML file into created iframe
document.all.IF rameLeft.src = url;
}
</script>
<script language="JavaS cript">
function loadPage(id,url ,varheight,varw idth) {
// create iframe inside content div
document.getEle mentById(id).in nerHTML = "<iframe name='IFrameCon tent' frameborder='no ' scrolling='no' width='" + varwidth +"' height='" + varheight + "'></iframe>";
// set the iFrame's height
document.all.IF rameContent.hei ght = varheight;
// insert content of HTML file into created iframe
document.all.IF rameContent.src = url;
}
</script>
[/CODE]
This is what happens, basically, or what I want to happen:
There's two <div>, one named "esquerda" and the other named "conteudo", and each link in flash orders the to open a different ifram on each. This is to avoid a framed site, that in this case doesn't make the trick. This works beautifully in Firefox, but not in IE, where it only opens one of the iframes.
The question is: wha'ts wrong with the code that makes IE not to handle it well?
Thanks in advance!
I have a Flash menu (Flash MX) and it has links that will open in a <div> in my html document, through a javascript function.
Flash code relating to the javascript:
getURL("javascr ipt:loadLeft('e squerda', '" + subleft[__reg3][__reg2] + "','400','179') " );
getURL("javascr ipt:loadPage('c onteudo', '" + subLink[__reg3][__reg2] + "','400','721') " );
Javascript in the HTML document:
[CODE=javascript]<script language="JavaS cript">
function loadLeft(id,url ,varheight,varw idth) {
// create iframe inside content div
document.getEle mentById(id).in nerHTML = "<iframe name='IFrameLef t' frameborder='no ' scrolling='no' width='" + varwidth +"' height='" + varheight + "'></iframe>";
// set the iFrame's height
document.all.IF rameLeft.height = varheight;
// insert content of HTML file into created iframe
document.all.IF rameLeft.src = url;
}
</script>
<script language="JavaS cript">
function loadPage(id,url ,varheight,varw idth) {
// create iframe inside content div
document.getEle mentById(id).in nerHTML = "<iframe name='IFrameCon tent' frameborder='no ' scrolling='no' width='" + varwidth +"' height='" + varheight + "'></iframe>";
// set the iFrame's height
document.all.IF rameContent.hei ght = varheight;
// insert content of HTML file into created iframe
document.all.IF rameContent.src = url;
}
</script>
[/CODE]
This is what happens, basically, or what I want to happen:
There's two <div>, one named "esquerda" and the other named "conteudo", and each link in flash orders the to open a different ifram on each. This is to avoid a framed site, that in this case doesn't make the trick. This works beautifully in Firefox, but not in IE, where it only opens one of the iframes.
The question is: wha'ts wrong with the code that makes IE not to handle it well?
Thanks in advance!
Comment