I played around with this a bit more and found that an event could be assigned to the page in the iframe that would transfer the pg keys to the parent page. It requires that the iframe be assigned a name that is the same as its id, example:
Code:
<iframe name="directory" id="directory" style="BORDER-TOP-WIDTH: 0px; BORDER-LEF . . .
Here are the modifications:
Code:
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
var fpg=function(e){
var e=e || window.frames[frameid].event;
if(e.keyCode==34||e.keyCode==33)
parent.focus();
};
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight){ //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
currentfr.contentDocument.onkeydown=fpg;
}
else if (currentfr.Document && currentfr.Document.body.scrollHeight){ //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
currentfr.Document.onkeydown=fpg;
}
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
var loadingDiv;
loadingDiv = document.getElementById("loading");
if (loadingDiv != null)
loadingDiv.innerHTML="";
self.focus();
}
Bookmarks