The object tag here is a poor choice because, although standard, support for it isn't all that good yet cross browser. I'd suggest iframe for this. Also, display is not a good property to use when hiding and revealing dynamic content. It often (as in this case) prevents scripts from being able to access in a meaningful way properties of the content that are required for proper functioning.
So, I'd recommend changing this:
Code:
<div id="A" style="display:none;"><br><br>
<object width=650 height=400 data="1a.html "></object>
</div>
to:
Code:
<div id="A" style="visibility:hidden;"><br><br>
<iframe src="1a.html" width="650" height="400" scrolling="auto" frameborder="0"></iframe>
</div>
And changing the code of your hide_show.js file from:
Code:
function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}
function ReverseDisplay(d) {
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
to:
Code:
function HideContent(d) {
document.getElementById(d).style.visibility = "hidden";
}
function ShowContent(d) {
document.getElementById(d).style.visibility = "visible";
}
function ReverseDisplay(d) {
if(document.getElementById(d).style.visibility == "hidden") { document.getElementById(d).style.visibility = "visible"; }
else { document.getElementById(d).style.visibility = "hidden"; }
}
Bookmarks