The two scripts do not play well together as, one resizes the iframe onload of the iframe's content page while the other resizes that page onclick. You could reload the switch page onclick (or on use of its main function) but, that will be a drag for slower connections. If you want to go that route anyway, add this code (highlighted red):
Code:
function expandcontent(curobj, cid){
var spantags=curobj.getElementsByTagName("SPAN")
var showstateobj=getElementbyClass(spantags, "showstate")
if (ccollect.length>0){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
if (showstateobj.length>0){ //if "showstate" span exists in header
if (collapseprevious=="no")
showstateobj[0].innerHTML=(document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbol
else
revivestatus()
}
}
if (window.location.reload)
window.location.reload( true );
else if (window.location.replace)
window.location.replace(unescape(location.href))
else
window.location.href=unescape(location.href)
}
into the function 'expandcontent' as shown. That should work alright in an iframe like you have it (untested, works on a single page).
Or, you could set the switch script to:
Code:
var collapseprevious="yes" //Collapse previously open content when opening present? (yes/no)
and insert enough white space at the bottom of the switch page so that it will start out tall enough.
Bookmarks